Learn R Programming

strvalidator (version 0.1)

calculateMean: Calculate mean

Description

calculateMean calculates the mean of given one or more replicate measurments.

Usage

calculateMean(data, colBaseName, ignoreNA = TRUE,
    calculateNA = NULL, replaceNA = NULL)

Arguments

data
a data frame containing at least 'Sample.Name' and 'colBaseName'.
ignoreNA
logical indicating how to handle NA.
calculateNA
value to replace NAs with before calculation.
replaceNA
value to replace NAs with in the final data frame.

Value

  • data.frame with additional columns 'N' and 'Mean'.

Details

Calculates the average given (one or) more replicate measurements.

Examples

Run this code
data(set1)
# Remove all except positive control samples.
set1 <- trim(data=set1, samples="PC")

calculateMean(data=set1, colBaseName="Height")

Run the code above in your browser using DataLab