# load example data
cohort_data <- load_clean(import= "no", file.cont = "SI_cohort", cohort= "yes",
format.cont = "long")$cohort_data
# \donttest{
# run function (takes close to 5 seconds)
cohort_fn(seed=10, sims = 100)$cohort_ft
# to import an excel spreadsheet (modify using local path,
# file and sheet name, range, and format):
# get path for example files
path <- system.file("extdata", "reappraised_examples.xlsx", package = "reappraised",
mustWork = TRUE)
# delete file name from path
path <- sub("/[^/]+$", "", path)
# load data
cohort_data <- load_clean(import= "yes", cohort = "yes", dir = path,
file.name.cont = "reappraised_examples.xlsx", sheet.name.cont = "SI_cohort",
range.name.cont = "A1:F101", format.cont = "long")$cohort_data# }
Run the code above in your browser using DataLab