check_measure: Check the range of responses

View source: R/checkmeasure.R

check_measureR Documentation

Check the range of responses

Description

Check the range of responses

Usage

check_measure(x, min, max)

Arguments

x

Measure/s you want to check.

min

Minimum value for the item/s

max

Minimum value for the item/s

Value

The mean, standard deviation, minimum, and maximum value for items. A message indicating which items have observations outside of the possible range of values for that item. "Pass" in columns titled min_check and max_check indicate all values are at or above the minumum value and at or below the maximum value. "CHECK" indicates that values fall outside of the possible range.

Examples

check_measure(fake_data$edeq6_1, 0, 6)
check_measure(fake_data[,grep('bdi_[0-9]{1,2}_clinical', colnames(fake_data))],0,6)
check_measure(fake_data[,c(41,48)], 0,3)
check_measure(fake_data[,c(which(colnames(fake_data)=="edeq6_1"), which(colnames(fake_data)=="ede6_6"))], 0,6)

cecusack/clairecleans documentation built on Dec. 14, 2024, 3:27 a.m.