Description Arguments Details Value collapse,LumiBatch and column collapse,LumiBatch and Missing values Author(s) Examples
collapse a dataset to have just 1 row per unique value of key.
x |
an object |
decreasing |
logical: should the sort order be increasing or decreasing? |
na.last |
for controlling the treatment of
|
FUN |
a function used to determine which row to
include, when there are multiple rows with the same
'column' value. eg |
column |
the column name within |
... |
arguments passed to FUN |
given an object with data, and 1 'key' column, containing possibly non-unique identifiers, create a result, which has unique values for those keys. The 'key' column could be a gene symbol, and each row could be a probe; the goal is to convert a 1-row-per-probe table into 1-row-per-gene.
something
The column
should be the name of a column found in
the fData(x)
slot. hint: colnames(fData(x)),
or fvarLabels(x)
Often some probes don't have a genesymbol, and should
thus have an NA
in this column. na.list
controls what to do with the gene-less probes.
na.last=TRUE
keeps the probes & moves them to the
bottom of the result. na.last=FALSE
keeps the
probes & leaves them in the sorted order specified by
FUN
. Note this is different to other
implementations of na.last
. na.last=NA
(default)
discards these probes from the result.
Mark Cowley
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
load("Rmisc/x.averaged.RDa.gz")
tmp <- collapse(x.averaged, FUN=var, decreasing=TRUE, na.last=FALSE, "SymbolReannotated")
## End(Not run)
if( require(lumi) ) {
data(example.lumi)
ex <- example.lumi[1:20, ]
featureData(ex)$GeneSymbol <- c("TP53", "BRCA1", "BRCA2", "KRAS", "SMAD4")
collapsed <- collapse(ex, TRUE, NA, mean, "GeneSymbol")
collapsed
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.