View source: R/lc50_export_auto.R
| lc50_export_auto | R Documentation |
Reads the csv file(s) at path, computes the LC values with
lc50_calculate and writes one 'Excel' workbook per csv
file with lc50_export - named after the data file and
placed next to the raw data.
lc50_export_auto(path = NULL, lc = 0.5, method = "traditional", suffix = NULL)
path |
Character string; a csv file or a folder with csv files,
classified with |
lc |
Numeric; the lethal proportion, passed on to
|
method |
Character string; the estimation method, passed on to
|
suffix |
Optional character string appended to the output file
names, e.g. |
Each csv file is processed completely on its own (read,
calculate, export) in its own loop pass, so the outputs of
different files can never mix. LB_48.csv produces
LB_48.xlsx in the same folder; for a folder every csv file
inside is processed the same way. A file that cannot be read is
skipped with a message (a single-file input that cannot be read is
an error); a file whose computation fails still gets its workbook
with the error recorded in the summary sheet. Non-default
settings are appended to the names so repeated runs do not
overwrite each other: lc = 0.9 gives
LB_48_LC90.xlsx, method = "probit" gives
LB_48_probit.xlsx.
The paths of the written xlsx files, invisibly.
lc50_export_plot_auto for the matching figure
export, lc50_export for a custom output location
f <- system.file("extdata", "lc50_example.csv", package = "insectecol")
tmp <- file.path(tempdir(), "lc50_example.csv")
file.copy(f, tmp, overwrite = TRUE)
lc50_export_auto(tmp) # -> <tempdir>/bioassay.xlsx
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.