Skip to contents

Creating standardized reports

tidycoRe provides several Quarto and RMarkdown templates that can be used for generating reports using standard CorEvitas templates.

Quarto Templates

To use a Quarto template, you will need to use the quarto_draft function from tidycoRe. To create a new Quarto document using the “Query Report Template” run the following code:

quarto_draft("./reports/{your file name}.qmd", template = "query_report_template")

RMarkdown Templates

To use an RMarkdown template, you can either select it via the RStudio GUI, or with the get_report_template function from tidycoRe.

RStudio GUI Method

You can initialize it from the Rstudio menu: File > New File > R Markdown… > From Template (left menu) > general_reporting (right menu). See the menu below:

Code Method

The following code downloads the specified report template to your local reports directory along with all necessary reference documents and figure files. You do need a reports directory within your project folder.

The function will first create a new folder named after the template, to house your new report within the reports directory. Please keep in mind, if any of the reference or markdown report files with the same name exist within the report folder, it will throw an error as it won’t overwrite.

The particular example below is a template designed for general reporting in the PsO registry for subscribers (can be applied to other registries):

tidycoRe::get_report_template("preliminary_query_counts", "pso", "sima")

Important tip for reports: if you would like navigation headers within your report to automatically register with the Microsoft Word, you must label your sections with the appropriate amount number of # to denote section headers.

Available Templates

Query Report Template (Quarto/RMarkdown)


Quarterly Registry Report Template (Quarto/RMarkdown)


PsO Preliminary Query Count Template (RMarkdown)

tidycoRe::get_report_template("preliminary_query_counts", "pso", "sima")


PsO General Reporting Template (RMarkdown)

tidycoRe::get_report_template("general_reporting", "", "lesser")