Description Usage Arguments Value Note See Also Examples
This function checks the vector v for any sparse responses. It will return TRUE or FALSE. If v contains only NA, then NA will be returned by the function.
1 | any_sparse_in_v(v, min_f = 5)
|
v |
A vector of questionnaire response data. |
min_f |
The minimum frequency desired for response category data. Any response categories that have a frequency count less than min_f will be considered by sparse (i.e., have potentially too little data). |
TRUE or FALSE depending on whether sparse responses are present.
This is intended as an internal function to the collapse() function. Use with care for other purposes.
collapse()
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)
any_sparse_in_v(sparse_vector)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.