reproDataCheck: Checks if an object can be used to perform reproduction...

View source: R/reproDataCheck.R

reproDataCheckR Documentation

Checks if an object can be used to perform reproduction toxicity data analysis

Description

The reproDataCheck function can be used to check if an object containing data from a reproduction toxicity assay meets the expectations of the function reproData.

Usage

reproDataCheck(data, diagnosis.plot = TRUE)

Arguments

data

any object

diagnosis.plot

if TRUE, produces a diagnosis plot

Details

Since in morse' reproduction data sets are a special case of survival data sets, reproDataCheck performs the same verifications than survDataCheck plus additional ones that are specific to reproduction data.

Value

The function returns a data.frame similar to the one returned by survDataCheck, 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

Note

If an error of type dataframeExpected or missingColumn is detected, the function reproDataCheck is stopped. When no error is detected the reproDataCheck function returns an empty dataframe.

See Also

reproData

Examples


# Run the check data function
data(copper)
reproDataCheck(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)
reproDataCheck(copper)


morse documentation built on Oct. 29, 2022, 1:14 a.m.