tcount {jamba} | R Documentation |
frequency of entries, ordered by frequency
Description
frequency of entries, ordered by frequency
Usage
tcount(
x,
minCount = NULL,
doSort = TRUE,
maxCount = NULL,
nameSortFunc = sort,
...
)
Arguments
x |
|
minCount |
optional |
doSort |
|
maxCount |
optional |
nameSortFunc |
|
... |
additional parameters are ignored. |
Details
This function mimics output from table()
with two key
differences. It sorts the results by decreasing frequency, and optionally
filters results for a minimum frequency. It is effective when checking
for duplicate values, and ordering them by the number of occurrences.
This function is useful when working with large vectors of gene identifiers, where it is not always obvious whether genes are replicated in a particular technological assay. Transcript microarrays for example, can contain many replicated genes, but often only a handful of genes are highly replicated, while the rest are present only once or twice on the array.
Value
integer
vector of counts, named by the unique input
values in x
.
See Also
Other jam string functions:
asSize()
,
breaksByVector()
,
fillBlanks()
,
formatInt()
,
gsubOrdered()
,
gsubs()
,
makeNames()
,
nameVector()
,
nameVectorN()
,
padInteger()
,
padString()
,
pasteByRow()
,
pasteByRowOrdered()
,
sizeAsNum()
,
ucfirst()
Examples
testVector <- rep(c("one", "two", "three", "four"), c(1:4));
tcount(testVector);
tcount(testVector, minCount=2);