calculate_mean_sd_trends {baldur} | R Documentation |
Calculate the Mean-Variance trend
Description
Calculates the mean and standard deviation of each row (peptide) and adds them as new columns. Assumes that the condition names are the names in the design matrix.
Usage
calculate_mean_sd_trends(data, design_matrix)
Arguments
data |
A |
design_matrix |
A design matrix for the data (see example). |
Value
A tibble
or data.frame
with the mean and sd vectors
Examples
# Setup model matrix
design <- model.matrix(~ 0 + factor(rep(1:2, each = 3)))
colnames(design) <- paste0("ng", c(50, 100))
yeast %>%
# Normalize data
psrn("identifier") %>%
# Get mean-variance trends
calculate_mean_sd_trends(design)
[Package baldur version 0.0.3 Index]