plot_epx: Plot EPx values

View source: R/plotting.r

plot_epxR Documentation

Plot EPx values

Description

Plot EPx values

Usage

plot_epx(
  EPx_ts,
  exposure_ts,
  draw = TRUE,
  time_col = "time",
  conc_col = "conc",
  epx_x_title = "Start time",
  conc_y_title = "Exposure conc."
)

Arguments

EPx_ts

the result of epx_mtw, ie. a tibble with window.start, window.end, endpoint, level and EPx

exposure_ts

an exposure time series with columns for time 't' and concentration 'conc'

draw

Should the whole plot be drawn? If FALSE the exposure plot and the EPx plot are returned as a list for later modification

time_col

the name of the time column in the exposure dataset

conc_col

the name of the concentration column in the exposure dataset

epx_x_title

title of the x-axis of the epx panel

conc_y_title

title of the y-axis of the concentration panel

Value

a grid of ggplots

Examples

ti <- 0:21
expo <- abs(0.01*ti + rnorm(length(ti), 0, 0.05))
exposure <- data.frame(time = ti, conc = expo)
metsulfuron_epx_mtw <- metsulfuron %>%
set_exposure(exposure) %>%
epx_mtw(level = 10, factor_cutoff = 1000)
metsulfuron_epx_mtw
plot_epx(EPx_ts = metsulfuron_epx_mtw,
exposure_ts = exposure, conc_y_title = "env. concentration [µg/L]")

cvasi documentation built on Sept. 23, 2024, 9:08 a.m.