indicator: Define indicators for data

View source: R/indicator.R

indicatorR Documentation

Define indicators for data


An indicator maps a data frame, or each record in a data frame to a number. The purpose of this class is to store and apply expressions that define indicators.


indicator(..., .file, .data)



A comma-separated list of indicator definitions


(optional) A character vector of file locations

See Also

syntax, add_indicators


# create an indicator for the number of missing x in data set

I <- indicator( 
 sum(               # number of missing variables
 , sum([c("x","y")])) # number of missing x and y
 , mean(            # fraction of missing variables
 , sum(x)
 , mean(x)

dat <- data.frame(x=1:2, y=c(NA,1))
C <- confront(dat, I)

validate documentation built on March 24, 2022, 5:07 p.m.