Linux command
rmarkdown 命令
网络
复制后可按需替换文件名、目录或参数。
常用示例
Render R Markdown to HTML
Rscript -e "rmarkdown::render('[file.Rmd]')"
Render to PDF
Rscript -e "rmarkdown::render('[file.Rmd]', output_format='pdf_document')"
Render to Word
Rscript -e "rmarkdown::render('[file.Rmd]', output_format='word_document')"
Render with parameters
Rscript -e "rmarkdown::render('[file.Rmd]', params=list(year=2024))"
说明
R Markdown combines R code with Markdown text to create dynamic documents. It can produce HTML, PDF, Word documents, presentations, dashboards, and more.
FAQ
What is the rmarkdown command used for?
R Markdown combines R code with Markdown text to create dynamic documents. It can produce HTML, PDF, Word documents, presentations, dashboards, and more.
How do I run a basic rmarkdown example?
Run `Rscript -e "rmarkdown::render('[file.Rmd]')"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more rmarkdown examples?
This page includes 4 examples for rmarkdown, plus related commands for nearby Linux tasks.