# NOT RUN {
td_raw <- tempfile() # temp dir for raw data
td_anon <- tempfile() # temp dir for preprocessed data
## simulate data and preprocess it
set.seed(62)
simulate_resp_files(32, path = td_raw, overwrite = TRUE)
# }
# NOT RUN {
## temporary files
tf1 <- tempfile(fileext = ".html")
tf2 <- tempfile(fileext = ".html")
## run the built-in R Markdown preprocessing script
pp_report <- preprocess_simulated(path = td_raw, outpath = td_anon,
report = tf1)
## run the built-in R Markdown analysis script
## this can take very long due to the CLMM fits
a_report <- reproduce_analysis_sim(path = td_anon,
outfile = tf2,
parallel = FALSE)
browseURL(a_report)
## clean up
file.remove(pp_report)
file.remove(a_report)
# }
# NOT RUN {
## clean up
unlink(td_raw, TRUE, TRUE)
unlink(td_anon, TRUE, TRUE)
# }
Run the code above in your browser using DataLab