Code for knit flexdashboard

Hi all

I've made a flexdashboard that I want to run daily via cron. I can of course manually knit the document to get the right output by pressing the knit button in r studio. But what code is this running? I would like to put this at the end of the rmarkdown and then use Rscript to run it from the terminal

title: "My Dashboard"
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: scroll
theme: bootstrap
editor_options:
chunk_output_type: console

It is running rmarkdown::render in a new clean session.

ah so I would need to make a seperate script that just says rmarkdown::render(myfile.Rmd) rather than putting it in the chunk at the end?

Yes you can use a separate script to run using RScript or directly call the expression using RScript -e "rmarkdown::render(...)"

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.