prep_min_obs_level: Support function to identify the levels of a process variable...

Description Usage Arguments Details Value

View source: R/prep_min_obs_level.R

Description

utility function to subset data based on minimum number of observation per level

Usage

1
prep_min_obs_level(study_data, group_vars, min_obs_in_subgroup)

Arguments

study_data

data.frame the data frame that contains the measurements

group_vars

variable list the name grouping variable

min_obs_in_subgroup

integer optional argument if a "group_var" is used. This argument specifies the minimum no. of observations that is required to include a subgroup (level) of the "group_var" in the analysis. Subgroups with less observations are excluded. The default is 30.

Details

This functions removes observations having less than min_obs_in_subgroup distinct values in a group variable, e.g. blood pressure measurements performed by an examiner having less than e.g. 50 measurements done. It displays a warning, if samples/rows are removed and returns the modified study data frame.

Value

a data frame with:


dataquieR documentation built on Feb. 26, 2021, 5:08 p.m.