dataGUTS {BeeGUTS} | R Documentation |
Read and format the data for the BeeGUTS model
Description
Read data from a text
or csv
file and recalculate the
exposure profile depending on the type of experiment (acute oral, acute contact, chronic oral).
Usage
dataGUTS(
file_location = NULL,
test_type = NULL,
bee_species = "Honey_Bee",
NA_string = getOption("datatable.na.strings", "NA"),
...
)
Arguments
file_location |
List of Locations of text files containing each two datasets, one for the survival data, and one for the concentration data. Both datasets must be included in the same file and contain the same number of column in the same order. The following columns must be included in the survival dataset:
A line containing the The following columns must be included in the concentration dataset
For the See detail section for example |
test_type |
list of test types amongst "Acute_Oral", "Acute_Contact", and "Chronic_Oral" this list must have the same length of the list of file locations |
bee_species |
the bee type among "Honey_Bee", "Bumble_Bee", "Osmia_bicornis", and "User_Bee". If "User_Bee" is selected, optional arguments to be passed to the concentration reconstruction need to be defined. |
NA_string |
a character vector of strings which are to be interpreted as NA values |
... |
Optional arguments to be passed to the concentration reconstruction (e.g.
|
Details
The filename must begin with name of the chemical substance being tested and each word of the filename should be separated via an underscore '_'.
#' Example of formatting of the input file for a chronic oral study
Survival time [d] | Control | T1 | T2 | T3 | T4 | T5 |
0 | 120 | 120 | 120 | 120 | 120 | 120 |
1 | 120 | 118 | 117 | 112 | 115 | 94 |
2 | 120 | 118 | 115 | 112 | 98 | 88 |
3 | 120 | 118 | 114 | 106 | 83 | 27 |
4 | 119 | 118 | 113 | 103 | 67 | 9 |
5 | 119 | 118 | 112 | 100 | 43 | 3 |
Concentration unit: ug/bee/day | ||||||
Concentration time [d] | Control | T1 | T2 | T3 | T4 | T5 |
0 | 0 | 3 | 7 | 12 | 41 | 68 |
5 | 0 | 3 | 7 | 12 | 41 | 68 |
Value
An object of class beeSurvData
, which is a list with the following information:
nDatasets |
Number of files passed to the function |
survData |
A table containing the survival data as entered by the user in the input file |
survData_long |
A data frame containing the survival data in long format for model purposes |
concData |
A table containing the concentration data as entered by the user in the input file |
concData_long |
A data frame containing concentration data in long format |
unitData |
A character vector containing the units of the data as entered in the line |
typeData |
A character vector containing the type of experiment |
beeSpecies |
A character vector containing the type bee |
concModel |
A data frame containing the concentration data as recalculated by the model |
concModel_long |
A data frame containing the concentration data as recalculated by the model in a long format |
Each element of the list is itself a list to account for multiple files that can be passed as input.
Examples
file_location <- system.file("extdata", "betacyfluthrin_chronic_ug.txt", package = "BeeGUTS")
lsData <- dataGUTS(file_location = c(file_location),
test_type = c('Chronic_Oral'),
bee_species = "Honey_Bee",
cstConcCal = FALSE)