Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

survData_join

Joins a concentration with a survival data set into an argument for 'survData' when the concentration varies over time


Description

This function joins two data sets, one for exposure measurements, the other for survival measurements, into a single dataframe that can be used with the survData function.

Usage

survData_join(x, y)

Arguments

x

a data.frame containing the following three columns:

  • replicate: a vector of class integer or factor for replicate identification

  • time: a vector of class integer with time points, min value must be 0

  • Nsurv: a vector of class integer providing the number of alive individuals at some or all time points for each replicate

y

a data.frame containing the following three columns:

  • replicate: a vector of class integer or factor for replicate identification

  • time: a vector of class integer with time points, min value must be 0

  • conc: a vector of class numeric providing the concentration at some or all time points for each replicate

Value

a dataframe suitable for 'survData'

Examples

# (1) Load the two survival data sets
data(propiconazole_pulse_exposure)
exposure <- propiconazole_pulse_exposure[,c("replicate", "time", "conc")]
survival <- propiconazole_pulse_exposure[,c("replicate", "time", "Nsurv")]

# (2) Create an objet of class 'survData'
dat_join <- survData(survData_join(exposure, survival))
class(dat_join)

morse

Modelling Tools for Reproduction and Survival Data in Ecotoxicology

v3.3.1
GPL (>= 2)
Authors
Virgile Baudrot [aut], Sandrine Charles [aut], Marie Laure Delignette-Muller [aut], Wandrille Duchemin [ctb], Benoit Goussen [ctb], Nils Kehrein [ctb], Guillaume Kon-Kam-King [ctb], Christelle Lopes [ctb], Philippe Ruiz [aut], Alexander Singer [ctb], Philippe Veber [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.