reduceReplicates: Reduce replicated measurements to mean and standard deviation

View source: R/statistics.R

reduceReplicatesR Documentation

Reduce replicated measurements to mean and standard deviation

Description

Obtain the mean and standard deviation from replicates per condition.

Usage

reduceReplicates(data, select = "condition", datatrans = NULL)

Arguments

data

A data frame containing the measurements. See Format for details.

select

Names of the columns in the data frame used to define conditions, see Details.

datatrans

Character vector describing a function to transform data. Use x to refer to data.

Format

The following columns are mandatory for the data frame:

name

Name of the observed species.

time

Measurement time point.

value

Measurement value.

condition

The condition under which the observation was made.

In addition to these columns, any number of columns can follow to allow a fine-grained definition of conditions. The values of all columns named in select are then merged to get the set of conditions.

Details

Experiments are usually repeated multiple times possibly under different conditions leading to replicated measurements. The column "condition" in the data allows grouping the data by their condition. However, sometimes, a more fine-grained grouping is desirable. In this case, any number of additional columns can be appended to the data. These columns are referred to as "condition identifiers". Which of the condition identifiers are used for grouping is user-defined by specifying their names in select. The mandatory column "condition" is always used. The total set of different conditions is thus defined by all combinations of values occurring in the selected condition identifiers. The replicates of each condition are then reduced to mean and standard deviation. New condition names are derived by merging all conditions which were used in mean and standard deviation. Columns that are not listed in select but have different values within grouped data are dropped. Columns that remain stable across all replicates are retained and horizontally attached to the resulting data frame.

Value

A data frame of the following variables:

time

Measurement time point.

name

Name of the observed species.

value

Mean of replicates.

sigma

Standard error of the mean, NA for single measurements.

n

The number of replicates reduced.

condition

The condition for which the value and sigma were calculated. If more than one column was used to define the condition, this variable holds the effective condition which is the combination of all applied single conditions.

other columns

Columns that were stable across replicates are retained and horizontally attached to the resulting data frame.

Author(s)

Wolfgang Mader, Wolfgang.Mader@fdm.uni-freiburg.de

Simon Beyer, simon.beyer@fdm.uni-freiburg.de


dkaschek/dMod documentation built on March 1, 2025, 9:04 p.m.