CheckData {morseDR} | R Documentation |
Checking object structure for analysis
Description
Checks if an object can be used to perform data analysis.
-
binaryDataCheck
: the function can be used to check if an object containing survival data is formatted according to the expectations of theBinaryData
function. -
continuousDataCheck
: the function can be used to check if an object containing survival data is formatted according to the expectations of thecontinuousData
function. -
countDataCheck
: the function can be used to check if an object containing data from a reproduction toxicity assay meets the expectations of the functioncountData
. ThecountDataCheck
performs the same checking thanbinaryDataCheck
plus additional ones that are specific to reproduction data.
Usage
binaryDataCheck(data, quiet = FALSE)
continuousDataCheck(data, quiet = FALSE)
countDataCheck(data, quiet = FALSE)
Arguments
data |
Any object, but usually a |
quiet |
Binary. Default is |
Value
The function returns a data.frame
with message describing the error in the
formatting of the data. When no error is detected the object is empty.
For
countDataCheck
, the function returns adata.frame
similar to the one returned bybinaryDataCheck
, except that it may contain the following additional errorid
s:-
NreproInteger
: columnNrepro
contains values of class other thaninteger
-
Nrepro0T0
:Nrepro
is not 0 at time 0 for each concentration and each replicate -
Nsurvt0Nreprotp1P
: at a given timeT
, the number of alive individuals is null and the number of collected offspring is not null for the same replicate and the same concentration at timeT+1
-
See Also
Examples
data(chlordan_daphnia)
continuousDataCheck(chlordan_daphnia)
# Run the check data function
data(copper)
countDataCheck(copper)
# Now we insert an error in the data set, by setting a non-zero number of
# offspring at some time, although there is no surviving individual in the
# replicate from the previous time point.
copper[148, "Nrepro"] <- as.integer(1)
countDataCheck(copper)