Reputation: 155
I have 2 scripts. One is an R script and the other an rmarkdown script.
I'm using the following code in the R script to run the markdown script:
rmarkdown::render("my_md_file_path_and_name.Rmd"))
I want to have the .html file it creates output into a folder of my choosing. At the moment it outputs into the same folder where the markdown script is stored.
Is this possible? I've done a lot of googling and although there's a lot of talk on this, i can't find anything which actually works. I'm not very familiar with markdown, so possibly there's a working solution i've read, but didn't fully understand how to code it into my script.
Upvotes: 0
Views: 1162
Reputation: 389335
You can use output_file
argument.
rmarkdown::render("my_md_file_path_and_name.Rmd",
output_file = '/file/path/out.html')
Upvotes: 2