Render an R Markdown document as a Nix derivation
Usage
rxp_rmd(
name,
rmd_file,
additional_files = "",
nix_env = "default.nix",
params = NULL,
env_var = NULL
)
Arguments
- name
Symbol, derivation name.
- rmd_file
Character, path to .Rmd file.
- additional_files
Character vector, additional files to include, for example a folder containing the pictures to include in the R Markdown document.
- nix_env
Character, path to the Nix environment file, default is "default.nix".
- params
List, parameters to pass to the R Markdown document. Default is NULL.
- env_var
List, defaults to NULL. A named list of environment variables to set before running the R Markdown render command, e.g., c(RSTUDIO_PANDOC = "/path/to/pandoc"). Each entry will be added as an export statement in the build phase.
Details
To include objects built in the pipeline,
rxp_read("derivation_name")
should be put in the .Rmd file.
See also
Other derivations:
rxp_py()
,
rxp_py_file()
,
rxp_qmd()
,
rxp_r()
,
rxp_r_file()