any_sparse_in_v: A internal function to check whether a vector v contains any...

Description Usage Arguments Value Note See Also Examples

View source: R/collapse.R

Description

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.

Usage

1
any_sparse_in_v(v, min_f = 5)

Arguments

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).

Value

TRUE or FALSE depending on whether sparse responses are present.

Note

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

See Also

collapse()

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)
any_sparse_in_v(sparse_vector)


## End(Not run)

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