| produce_report | R Documentation |
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.
produce_report(report_infos, report_filename = "report.Rmd", verbose = FALSE)
report_infos |
A |
report_filename |
The name of the rmarkdown file to create. If
|
verbose |
Print progression? Default: |
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!
Invisibly returns the lines saved to the Rmd file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.