Description Usage Arguments Value Note See Also Examples
An internal function that returns the number of possible response categories in a vector v.
1 | n_resp_cats(v)
|
v |
A vector, usually of self-report items, and usually numeric. |
The number of response categories in v. Note that NA is not counted as a response category
This is intended as an internal function to the collapse() function. Use with care for other purposes.
collapse()
n_sparse()
1 2 3 4 5 6 7 | ## Not run:
sparse_vector <- c(1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6)
n_resp_cats(sparse_vector)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.