CheckData: Checking object structure for analysis

CheckDataR 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 the BinaryData function.

  • continuousDataCheck: the function can be used to check if an object containing survival data is formatted according to the expectations of the continuousData function.

  • countDataCheck: the function can be used to check if an object containing data from a reproduction toxicity assay meets the expectations of the function countData. The countDataCheck performs the same checking than binaryDataCheck 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 list or a data.frame.

quiet

Binary. Default is False. If True it returns messages of the checking function.

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 a data.frame similar to the one returned by binaryDataCheck, except that it may contain the following additional error ids:

    • NreproInteger: column Nrepro contains values of class other than integer

    • Nrepro0T0: Nrepro is not 0 at time 0 for each concentration and each replicate

    • Nsurvt0Nreprotp1P: at a given time T, 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 time T+1

See Also

binaryData

countData

continuousData

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)


morseDR documentation built on June 8, 2025, 10:20 a.m.