What is the code behind the knit html button in rs

2019-05-22 07:48发布

问题:

I followed the Rstudio advice to Customize Markdown Rendering. And created an .Rprofile file at the root of the project directory that overrides default markdown rendering options. But there seems to be an issue with equation rendering (see my earlier question).

What is the code behind the "knit html" button in RSTUDIO Version 0.98.501 ?

回答1:

it's running rmarkdown::render('your_file.Rmd')

by default it will create an output file with the same name as your .Rmd file and in the same directory. If you checkout the documentation [1] for the code, you'll see you can actually specify output_file and output_dir for different file names and different directory, respectively.

[1] http://cran.r-project.org/web/packages/rmarkdown/



标签: r rstudio