create_report.Rd
Create the reproducible HTML sensory report
create_report(
author,
session,
products,
output_dir,
report_template = app_sys("report")
)
Character. Author of the report.
Character. ID of the sensory session.
Character. Vector of products to include into the report.
Character. Path of the folder to save the report.
Character. Path of the folder containing the report template.
A list with the folder and the file of the created report.
# Create a temporary directory
my_temp_dir <- tempfile()
dir.create(my_temp_dir)
# Create the sensory report
res_info_report <- create_report(
author = "Swann",
session = "SESS2301",
products = c("PROD1", "PROD2",
"PROD3", "PROD4",
"PROD5", "PROD6"),
output_dir = my_temp_dir
)
# Open the sensory report
browseURL(
file.path(
res_info_report$output_dir_report,
res_info_report$output_file_report
)
)
# Delete temporary directory
unlink(my_temp_dir, recursive = TRUE)