median_by_factor | R Documentation |
This assumes of course that (like expressionsets) there are separate columns for each replicate of the conditions. This will just iterate through the levels of a factor describing the columns, extract them, calculate the median, and add that as a new column in a separate data frame.
median_by_factor(data, fact = "condition", fun = "median")
data |
Data frame, presumably of counts. |
fact |
Factor describing the columns in the data. |
fun |
Optionally choose mean or another function. |
Used in write_expt() as well as a few random collaborations.
Data frame of the medians.
[Biobase] [matrixStats]
## Not run:
compressed = median_by_factor(data, experiment$condition)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.