tox_data | R Documentation |
Takes ecotox study data in long-form tabular format and prepares it for parameter fitting. It supports extracting (optional) exposure concentration from tabular data (useful for e.g. studies of acute toxicity) or exposure series can also provided as individual time-series.
tox_data(data, exposure = NULL)
data |
a |
exposure |
an optional named list; names must correspond to trial IDs used for
the |
a ToxData
object
The long-form tabular data must have at least two and at most four columns. The position of the columns define what they represent, the column names are ignored:
First column: time
Second column: observed quantity, e.g. number of individuals
(optional) Third column: Trial or treatment ID
(optional) Fourth column: Concentration
The first two columns, time and observed quantity, must always be present. The third column, trial ID, is used to split the table by treatment so that trials can later be handled individually. The fourth column, concentration, can be used to also define the exposure level during the experiments.
As an alternative to defining concentrations along observed data, exposure
can also be passed as a list of exposure levels and series with
argument exposure
. It can be used to provide exposure series for each
trial. The following object types are supported to define exposure:
Numerical constants
Tabular data, e.g. data.frame
s
exposure series objects
If exposure is constant over time, exposure can be defined using a single
constant value. More complex exposure time-series can be defined using e.g.
data.frame
s. Tabular data must have two columns with the first column
representing time and the second column representing exposure/concentrations.
library(dplyr)
mydata <- schmitt2013 %>% tox_data()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.