run_script() runs the script in a fresh environment and returns the
objects it created (for example mod, sel, dif_res, scores).
With check = TRUE it first runs the whole script on simulated data with
the same structure as yours (same items, categories and groups) in a
temporary folder, so errors show up before your data are touched.
save_script() writes the script to a .R file.
Usage
run_script(x, check = FALSE, echo = interactive())
save_script(x, file = "analysis.R", open = FALSE)Arguments
- x
an
mv_scriptfrommv_ask().- check
logical; do a dry run on simulated data first.
- echo
logical; print each line and its output as it runs.
- file
path of the
.Rfile to write.- open
logical; open the file in the RStudio or Positron editor (needs the rstudioapi package).