View source: R/lc50_export_auto.R
| lc50_export_plot_auto | R Documentation |
Reads the csv file(s) at path, computes the LC values, draws
the regression plot of lc50_plot for every file and
saves it with lc50_export_plot - named after the data
file and placed next to the raw data.
lc50_export_plot_auto(
path = NULL,
lc = 0.5,
method = "traditional",
suffix = NULL,
device = "tiff",
dpi = 600,
width = 12,
height = 8,
units = "cm",
bg = "white",
font = "TNM",
unit = NULL,
shape = c("sigmoid", "linear"),
ci = TRUE,
ci_level = 0.95,
error_bar = TRUE,
move_thres = 0.5,
lc_ci = TRUE,
lc_p = TRUE,
lc_lab_gap = 0.35,
lc_lab_gap_right = 0.1,
lc_lab_dy = 0.1,
lc_lab_lh = 1.05,
preview = FALSE
)
path, lc, method, suffix |
Same as |
device, width, height, dpi, units, bg |
Figure settings, passed on
to |
font, unit, shape, ci, ci_level, error_bar, move_thres, lc_ci, lc_p, lc_lab_gap, lc_lab_gap_right, lc_lab_dy, lc_lab_lh |
Plot settings, passed on to |
preview |
Logical (default |
The pipeline and the file-naming rules are the same as in
lc50_export_auto, plus _linear for
shape = "linear": LB_48.csv gives LB_48.tiff,
lc = 0.9, method = "probit" gives
LB_48_LC90_probit.tiff. The two functions are fully
independent: each reads and computes the data on its own, so they
can be called alone or in any order. A file whose computation
fails gets no figure. With method = "all" the figure shows
the first method that succeeded.
Invisibly a list with elements plots (named list of
the ggplot objects, e.g. for print() or
lc50_export_plot(plots, ...)) and files (paths of the
written images).
lc50_export_auto, lc50_plot,
lc50_export_plot
f <- system.file("extdata", "lc50_example.csv", package = "insectecol")
tmp <- file.path(tempdir(), "lc50_example.csv")
file.copy(f, tmp, overwrite = TRUE)
lc50_export_plot_auto(tmp) # -> <tempdir>/bioassay.tiff
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.