Use `rmarkdown::render` in a restricted environment
问题 I have the following Rmd file I called test.Rmd : --- title: "test" output: html_document --- ```{r} print(y) ``` ```{r} x <- "don't you ignore me!" print(x) ``` I want to call render the following way: render('test.Rmd', output_format = "html_document", output_file = 'test.html', envir = list(y="hello")) but it fails: processing file: test.Rmd |................ | 25% ordinary text without R code |................................ | 50% label: unnamed-chunk-1 |.................................