This function groups data frame entries by specified features, and entries within each grouping as assigned to the same replicate set. Values within a replicate set are expected to be compatible, such that they can be pooled as means and variances prior to computing precision errors.

defineReplicateSet(df, replicate.strata)

Arguments

df

data frame

replicate.strata

Feature grouping used to define a replicate set. Provided as a vector of characters, all which are expected to be column headers in the input data frame.

Value

Vector of values (same length as number of entires in input data frame), where the same values are assigned to common replicate sets.

Details

For example, if a phantom was scanned in triplicate, resulting in multiple parameter measurements across several phantom sections, a single replicate set would consist of 3 measurements, all coming from the same section of a given phantom (replicate.strata = c("section", "phantom")). If the same replicate scans were repeated at a later date, or different site, this would be considered a separate replicate set (replicate.strata = c("section", "phantom", "timePoint", "site")).