freq.table | R Documentation |
freq.table
is used to obtain a frequency table of values from a
numeric vector. Unlike table
it includes the frequency of each
integer value on the interval from the smallest to the largest observed
value, and thus can contain also zeros.
freq.table(x)
x |
a numeric vector. |
freq.table
first coerces the input vector into type integer
and then creates a table of frequencies of all integers on the closed
interval from the smallest to the largest inputed integer.
A named vector of frequencies.
Juraj Medzihorsky
table
set.seed(1989) y <- c(rpois(1e1, 3), rpois(1e1, 1e1)) freq.table(y) # compare with table() table(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.