This function allows you to generate a demographics table breaking down the provided characteristics into the groups present in groupChar and optionally to perform tests to determine the differences between groups. This table can be saved to CSV optionally as well.
1 2 3 | table1(eSet, groupChar, characteristics, groupNames = NULL, printN = T,
saveResultsCSV = F, filename = "tempTable1.csv", testGroupDiffs = F,
factorTest = fisher.test, numericTest = aov, userFuncs = NULL)
|
eSet |
Either an expression set object or data.frame demographics table |
groupChar |
The trait (a column name) from the eSet object; each factor level is assumed to be a group that will be represented in the table as a new column |
characteristics |
The character vector of traits to summarize in the table |
groupNames |
[optional] User can define the names to be printed in the table, replacing the levels in the groupChar factor |
printN |
whether or not to add a row at the top of each column with the total number of samples present in that group |
saveResultsCSV |
Defaults to FALSE; whether to save the table to a csv file |
filename |
Defaults to tempTable1.csv; filename defining where to save the table |
testGroupDiffs |
Defaults to FALSE; whether or not to test the group differences on each characteristic; factors tested by fisher and numerics by aov |
factorTest |
- not implemented yet; Defaults to fisher.test; test used to determine group differences by factor characteristics |
numericTest |
- not implemented yet; Defaults to aov; test used to determine group differences by numeric characteristics |
userFuncs |
- not implemented yet table1(eSet=expressionSet, groupChar="CancerStatus", characteristics=c("Smoking", "Sex", "Pack Years")) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.