Closed RKonstantinR closed 1 year ago
There is a way to set custom parameters in "rmdshot" with "rmd_args" that override params specified within the YAML front-matter rmd or quarto document?
--- title: "repex_rmdshot" format: html editor: visual params: col_name: "cyl" --- ```{r} library(dplyr) mtcars %>% select(params$col_name)
### R script
library(webshot)
webshot::rmdshot("repex_rmdshot.qmd", rmd_args = list(col_name = "mpg"), file = here::here("test.png"))
## My code is giving me an error:
Error in (function (input, output_format = NULL, output_file = NULL, output_dir = NULL, : unused argument (col_name = "mpg")
I'm sorry I figured it out. webshot::rmdshot("repex_rmdshot.qmd", rmd_args = list(params = list(col_name = "mpg")), file = here::here("test.png"))
There is a way to set custom parameters in "rmdshot" with "rmd_args" that override params specified within the YAML front-matter rmd or quarto document?
Repex:
quarto doc:
library(webshot)
webshot::rmdshot("repex_rmdshot.qmd", rmd_args = list(col_name = "mpg"), file = here::here("test.png"))
Error in (function (input, output_format = NULL, output_file = NULL, output_dir = NULL, : unused argument (col_name = "mpg")