log2_fold_change
calculates the log2 fold change of a matrix with
features in the rows and samples in the columns.
log2_fold_change(
mat,
condition_vector,
condB = NULL,
log = FALSE,
pseudocount = 0
)
A matrix. Features in rows and samples in columns.
A character vector or factor with the names of the conditions. The conditions must correspond to the samples, i.e. the exact same order. Two and only two conditions (levels) are needed.
Condition used as reference. E.g. control condition.
If log is TRUE, it's assumed that the matrix is already log transformed.
Numeric value indicating pseudocount to be added.
A named vector of log2 fold changes per feature.