Learn R Programming

cvasi (version 1.4.0)

plot_epx: Plot EPx values

Description

[Experimental]

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."
)

Value

a grid of ggplots

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

Examples

Run this code
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]")

Run the code above in your browser using DataLab