count_extremes: Convenience wrapper for 'count_cells' for counting NAs.

Description Usage Arguments Details Value

View source: R/missing_values.R

Description

Count the number of NAs in the data briken down by region, measure and some third factor, usually subject or item.

Usage

1
2
count_extremes(dat, by, rois, mois, value.col, region.col, measure.col,
  max.cutoff, min.cutoff = 0)

Arguments

dat

data.frame containing data to process

by

quosure with column name for the main grouping variable. See "Details"

rois, mois

vectors of identifiers for regions and measures, in which cells have to be counted. Any of these can be left unsepcified, in this case, all regions and/or measure form the data will be used.

value.col

quosure with column name containing the NAs (potentially along with non-NA values. Typically it will be the column containing the reaction times or something alike).

region.col

quosure with column name containing region identifiers

measure.col

quosure with column name containing measure identifiers

max.cutoff

numeric value, indicating the upper threshold; any values above this threshold will be considered "extreme" and counted

min.cutoff

numeric value, indicating the lower threshold. Defaults to 0

Details

The by argument would typically contain subject or item column name. this is the main grouping variable, which varies slowest and will be displayed on the y axis in the summary plots.

Value

data.frame with 4 columns. The first 3 are analogous to count_cells (i.e. they contain the main grouping variable identifier (typically subject or item), the combination of region and measure identifying subsets of data, and extreme values counts), and the fourth one, called "direction", indicates whether the value is extremely high (then the corresponding row will contain "above.max" in the"direction" column) or extremely low ("below.min" in the "direction" column).


antonmalko/ettools documentation built on May 28, 2019, 3:35 p.m.