reproData: Creates a dataset for reproduction toxicity analysis

View source: R/reproData.R

reproDataR Documentation

Creates a dataset for reproduction toxicity analysis

Description

This function creates a reproData object from experimental data provided as a data.frame. The resulting object can then be used for plotting and model fitting. The reproData class is a sub-class of survData, meaning that all functions and method available for survival analysis can be used with reproData objects.

Usage

reproData(x)

Arguments

x

a dataframe as expected by survData containing one additional Nrepro column of class integer with positive values only. This column should provide the number of offspring produced since the last observation.

Details

The x argument contains the experimental data, and should have the same structure than the argument of survData, plus a single additional column providing the total number of offspring observed since the last time point. The function fails if x does not meet the expected requirements. Please run reproDataCheck to ensure x is well-formed.

Note that experimental data with time-variable exposure are not supported.

Value

An object of class reproData.

Examples


# (1) Load reproduction dataset
data(cadmium1)

# (2) Create an object of class "reproData"
dat <- reproData(cadmium1)
class(dat)


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