View source: R/lifetable_calculate.R
| lifeTable_calculate | R Documentation |
Runs the complete workflow (reading, validation, calculation, plotting
and exporting) for every csv file in a folder, or for a single csv
file. Each data set gets its own 'Excel' workbook; in addition an
all.xlsx with the summary of all files is created. Files that
fail (e.g. because of data errors) are skipped and reported at the end
without interrupting the remaining files.
lifeTable_calculate(
path,
output_path = NULL,
plot = TRUE,
keep_tiff = FALSE,
dpi = 300,
bootstrap = FALSE,
B = 1e+05,
seed = NULL
)
path |
Character; the data path: a folder (all csv files inside
are analysed) or a single csv file. The type of the path is
determined by |
output_path |
Character; the export folder. Defaults to the parent folder of the csv file (single-file mode) or the data folder itself (folder mode). |
plot |
Logical; whether the age-stage survival curves are
generated and embedded into the workbooks (default |
keep_tiff |
Logical; whether to keep the standalone tiff files
(default |
dpi |
Numeric; resolution of the exported images (default 300). |
bootstrap |
Logical; whether to estimate the standard errors
and percentile confidence intervals of all scalar parameters of
every file with |
B |
Integer; number of bootstrap replicates per file (only
used when |
seed |
Integer; base seed of the bootstrap random number
generator (only used when |
A summary data frame with one row per successfully analysed
file (population parameters as columns, plus their bootstrap
standard errors as _SE columns when bootstrap =
TRUE); the attribute error_files contains the names of
the files that failed.
lifeTable_read, lifeTable_calculate_all,
lifeTable_bootstrap, lifeTable_plot,
lifeTable_export
f <- system.file("extdata", "lifetable_example.csv", package = "insectecol")
lifeTable_calculate(f, output_path = file.path(tempdir(), "insectecol-demo"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.