makeDrm: Reshape a seed germination datasets for time-to-event...

View source: R/makeDrm.R

makeDrmR Documentation

Reshape a seed germination datasets for time-to-event analyses

Description

MakeDrm: this function reshapes a common field book for germination assays into the form that is required for time-to-event analyses with drm() in the drc package and drmte() in the drcte package. The common field book has one row per each Petri dish and the counts of germinated seeds at each assessment time are listed in different columns.

Usage

makeDrm(counts, treat, nViable, moniTimes)

Arguments

counts

Dataframe listing the counts of germinated seeds in each Petri dish (rows) at each assessment time (columns).

treat

Dataframe listing for each dish the levels of each treatment. It has as many columns as there are treatments in the experiment.

nViable

A vector with the number of viable seeds per dish, at the beginning of the assay

moniTimes

Vector of monitoring times. It needs to be of the same length as the number of columns in 'counts'.

Value

This function returns a dataframe

Author(s)

Andrea Onofri

Examples

# makeDrm is deprecated (example not run)
# library(drcSeedGerm)
# data(lotusOr)
# counts <- lotusOr[,3:length(lotusOr[1,])]
# treat <- data.frame(tratt=lotusOr[,1])
# nViable <- rep(25,12)
# moniTimes <- c(1:15)
# datasetDrc <- makeDrm(counts=counts, treat=treat, nViable=nViable, # moniTimes)
# head(datasetDrc, 30)

OnofriAndreaPG/drcSeedGerm documentation built on March 14, 2023, 5:45 p.m.