Learn R Programming

pla (version 0.1)

data2assayFrame: Check dataframe for pla.fit

Description

Check and prepare a dataframe with data for pla, pla.fit, and pla.plots.

Usage

data2assayFrame(dataframe,
                dr = 1.5,
                Z = log((1/dr)^(max(Dilution) - Dilution)),
                design = "lsd")

Arguments

dataframe
dataframe with the columns Response, Dilution, Sample, and Replicate (or Row and Column).
dr
The dilution ratio of the geometric dilution serie with equally spaced dilutions (constant ratio between any adjacent dilutions) on the logarithmic scale.
Z
The 'concentration', by default computed as $log((1/dr)^{(max(Dilution) - Dilution)})$, where Dilution is a columns of the argument dataframe.
design
If "lsd", then Row and Column has to be columns of the dataframe, and a column Replicate is copied from Row. Replicate and Row is also used for

Value

Details

This function is used internally in pla to check the dataframe that can be given with the data for pla.fit. It can also be used to prepare a dataframe for direct call of pla.fit. Relevant columns are added for pla.fit, and the dataframe is sorted for pla.plots.

Examples

Run this code
# Example 1:

require(graphics)
Dilution  <- 2 + log(ToothGrowth["dose"]) / log(2)
names(Dilution) <- "Dilution"
Replicate <- rep(1:10, 6)
Data      <- cbind(ToothGrowth, Replicate, Dilution)
dimnames(Data)[[2]] <- c("Response", "Sample", "Dose", "Replicate", "Dilution")
Design    <- "crd"
Frame     <- data2assayFrame(Data, dr = 2, design = Design)
Fits      <- pla.fit(Frame, sampleLabels = c("VC", "OJ"), dr = 2,
                     design = Design, main = "ToothGrowth", show = TRUE)
pla.plots(Frame, design = Design,
          sampleLabels = c("VC", "OJ"), main = "ToothGrowth")

Run the code above in your browser using DataLab