Description Usage Arguments Details Value Author(s) See Also Examples
This script uses grep to combine the data from all individuals in a group, for a specific data type(s), and calculates the summary statistic requested.
1 2 | calcCombVals(data, groupID, colID = "FPKM", combineCols = TRUE,
matchEnd = TRUE, FUN = "mean", functionName = NULL)
|
data |
A data.frame or matrix containing the individual data (columns) for
several genes (rows) from which to calculate the test statistic |
groupID |
A character vector or list. If character, include the group IDs, to be used as patterns in grep.
Make sure the names are unique enough to match only what you want them to.
To include all groups for a data type, set |
colID |
A character vector of the columns of interest (e.g. FPKM).
To include all columns for each group, set |
combineCols |
Logical, should the resulting columns be put into one data.frame (default, |
matchEnd |
Logical, should the |
FUN |
Either be a function or a character that can be coerced to function using |
functionName |
A string to use in naming the output columns or list names.
Defaults to |
This function uses grep to grab a series of columns (by group and by column type),
and then runs a summary function (FUN
) on each set.
This can effectivley calculate group statistics for visualization and course analysis,
such as means, medians, etc.
If combineCols = TRUE
, returns a data.frame with one column for each set (groupID by colID).
If combineCols = FALSE
, returns a list with one entry for each set (groupID by colID).
Mark Peterson
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.