Description Usage Arguments Value Examples
This function is very similar to table except that: it counts missing values if present, can use weights, only does 1d, returns a 2 column data frame instead of a named vector, and is much much faster.
1 | compute_count_vec(x, w = NULL)
|
x |
A logical vector, a factor, a double or integer vector (or
S3 object with |
w |
Optionally, a vector of weights. If present, weights are summed instead of counting observations. In other words, the default behaviour is to assign weight 1 to each point. |
A data frame with columns:
x_ |
value (same type as |
count_ |
number of observations/sum of weights (numeric) |
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.