I need to parameterize both the title and the author of a Markdown report. I am able to set the title and generate reports from a loop that subset my dataset but I can't figure out how to match the title with a corresponding author that I've in my dataset.
For instance, I've a set of courses taught by different instructors. I can get the title of the course as the title of the markdown report:
for (c in unique((na.omit(data$NAME_OF_THE_COURSE)))){
rmarkdown::render('LOCATION_WHATEVER',
params = list(set_title= c),
output_file = paste("report_post_", c, '_', Sys.Date(), ".html", sep=''),
output_dir = 'LOCATION_WHATEVER')
}
But I am not able to set the author since I would need another loop where
for (author in unique((na.omit(data$NAME_OF_INSTRUCTUR))))
Any suggestion?