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:

  • Survival time \[d\]: a vector of time in days

  • Control A vector of number of survivors for the control

  • T1 - Tn A vector of number of survivors for the treatments T1 to Tn, one column per treatment.

A line containing the Concentration unit must be included directly after the end of the last row of the survival data.

The following columns must be included in the concentration dataset

  • Concentration time \[d\]: a vector of time in days.

  • Control A vector of concentrations for the control

  • T1 - Tn A vector of concentration for the treatments T1 to Tn, one column per treatment.

For the Acute_Oral and Acute_Contact, only the initial exposure concentration at time 0 is required.

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.

  • k_sr = for the stomach release rate (d-1), default is 0.625 for Honey bee,

  • k_ca = contact availability rate (d-1), default is 0.4 for Honey bee), or

  • cTime = the duration of exposure in days for the acute oral tests, default is 0.25 d

  • cstConcCal = logical, recalculate concentration in the Chronic_Oral test from mg a.s./kg feed to Xg/bee (default is TRUE)

  • f_rate = numerical vector, feeding rate used in the concentration recalculation in the Chronic_Oral (default is 25 mg/bee/day for honey bee)

  • targConc = numerical scalar, target concentration unit in the recalculation in the Chronic_Oral, 1 for µg/bee, 2 for ng/bee, 3 for mg/bee (default is 1).

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 Concentration unit of the input file

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)


[Package BeeGUTS version 1.1.3 Index]