Description Usage Arguments Value See Also Examples
Computes number of occurrences of specified elements in a vector. This function behaves slightly different than R base function table
, since we specify the elements, frequency of elements that were not found will be reported as zero. See also http://stackoverflow.com/questions/1923273/counting-the-number-of-elements-with-the-values-of-x-in-a-vector
1 | freq(x, elts)
|
x |
A numeric vector that we wish to check how many times elements specified in |
elts |
A vector with elements that we wish to count in vector |
A numeric vector of the same length as elts
, with names elements.
table
which is very similar
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.