n_resp_cats: An internal function that returns the number of possible...

Description Usage Arguments Value Note See Also Examples

View source: R/collapse.R

Description

An internal function that returns the number of possible response categories in a vector v.

Usage

1

Arguments

v

A vector, usually of self-report items, and usually numeric.

Value

The number of response categories in v. Note that NA is not counted as a response category

Note

This is intended as an internal function to the collapse() function. Use with care for other purposes.

See Also

collapse()

n_sparse()

Examples

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)

jameswgriffith/jamie documentation built on Dec. 20, 2021, 9:03 p.m.