View source: R/misc_functions.R View source: R/RcppExports.R
counts | R Documentation |
This function uses Rcpp sugar to implement a fast table
, for
unique counts of a single vector. This implementation seeks to
produce identical output to table(x, useNA="ifany")
. It is borrowed
from Kmisc
package for convenience, since Kmisc
is not in CRAN
anymore. Kmisc
is available at https://github.com/kevinushey/Kmisc
counts(x)
x |
A numeric, integer, character or logical vector, or a (potentially
nested) list of such vectors. If |
The order of NA
, NaN
in the output may differ – even
R is inconsistent with the order that NA
and NaN
elements
are inserted.
x <- round( rnorm(1E2), 1 )
counts(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.