Run RMarkdown with arguments on the command line
问题 I'm trying to run a Rmarkdown file ( myfile.Rmd ) from the command line terminal. This file needs to take an argument to work. We can use this simple file as an example: --- title: "Simple example" output: pdf_document: default --- ```{r read_arg, include=FALSE} args = commandArgs(TRUE) VAR = args[1] ``` ```{r show_var} VAR ``` So, first of all, is it possible to run a Rmarkdown file by reading arguments as done for Rscripts? I mean, not by reading input files as described in this question.