produce_report: Produce report in Rmd format

View source: R/report.R

produce_reportR Documentation

Produce report in Rmd format

Description

The function will build a rmarkdown file based on the the report_infos table. The table must contain at least the following columns: add and value. The add must be one of the following: text, file or plot. The value will vary depending on the type of add.

Usage

produce_report(report_infos, report_filename = "report.Rmd", verbose = FALSE)

Arguments

report_infos

A data.frame or the path to a csv file that describes the report to produce.

report_filename

The name of the rmarkdown file to create. If NULL, the report won't be saved to file. Default: report.Rmd

verbose

Print progression? Default: FALSE.

Details

You can also add the id_report column that will need to contains a unique identifiers for each line of the report_infos table.

For text, it must be a character string corresponding to the text that will be directly added to the file specified with report_filename file.

For file, it must be a valid path to a filename

For plot, it must be a valid path to a rds file that contains the plot to show. The plot must be into a format that can be shown using the print function

The extra column will be used only when the add value is "plot" and will be added as is to the code chunk. Be aware that not validity checks are performed. Make sure you use valid chunk option syntax.

The content of the rmarkdown will be created by parsing each line of the report_infos table and adding the requested elements in the same order as they are found in the table.

There will be no validation that the created rmarkdown file is in the correct format!

Value

Invisibly returns the lines saved to the Rmd file.


CharlesJB/rnaseq documentation built on Oct. 17, 2023, 5:37 p.m.