Skip to contents

Run a dessert recipe on an analysis or data set

Usage

dessert.lm(data, output_format = NULL, output_dir = NULL)

Arguments

data

The input data set or fit object to call dessert on.

output_format

The R markdown output format parsed to `rmarkdown`.

output_dir

The output directory for the rendered output files.

Value

A reproducible standard publication archive

Examples


# Call a lm dessert on a fitted linear model

fit <- lm(dist ~ speed, data = cars)
dessert.lm(fit, output_format = "html_document")
#> Warning: problem copying /opt/R/4.2.3/lib/R/site-library/dessert/rmd/lm.Rmd to /home/runner/work/dessert/dessert/docs/reference/lm.Rmd: No such file or directory
#> Warning: problem copying /opt/R/4.2.3/lib/R/library/dessert/rmd/lm.Rmd to /home/runner/work/dessert/dessert/docs/reference/lm.Rmd: No such file or directory
#> files have been stored in /home/runner/work/dessert/dessert/docs/reference

# Remove the generated files in R-CMD-Check
# Don't run as an example in real life
unlink(c("dessert_envir.RData", "lm.Rmd", "lm.html"))