Learn R Programming

validate (version 0.1.4)

indicator: Define indicators for data

Description

This feature is currently experimental and may change in future versions

Usage

indicator(..., .file)

Arguments

...
A comma-separated list of indicator definitions
.file
(optional) A character vector of file locations

Details

indicator

See Also

syntax

Examples

Run this code
# create an indicator for the number of missing x in data set
I <- indicator( 
   number_missing(x)     # number of missing x
 , number_missing(x,y)   # number of missing x and y
 , number_missing()      # number of missing variables
 , fraction_missing()    # fraction of missing variables
 , sum(x)
 , mean(x)
) 

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

Run the code above in your browser using DataLab