collapse_replicates: Collapse technical replicates to unique values

Description Usage Arguments Value Note See Also

View source: R/collapse.R

Description

Summarize replicated data to unique values per identifier using the the median or the mean values.

Usage

1
2
collapse_replicates(x, id_col = NULL, replicates = NULL,
  method = c("mean", "median"), drop = character(), df = FALSE)

Arguments

x

A matrix, data frame or data table.

id_col

Column name of identifiers column (key column).

replicates

A vector of length nrow(x) of replicates identifiers. Optional, if id_col isn't in x or to substitute id_col.

method

Method to summarize rows. Defaults to "median".

drop

Columns to drop (before summarizing and from result).

df

Return a data frame instead of a data table. Defaults to FALSE.

Value

Table with unique identifiers and single values for each variable and observation.

Note

Uses median without checking or data.tables' internaly optimized mean.

See Also

collapse_genes


csbl-usp/collapseR documentation built on May 6, 2019, 8:32 p.m.