indicator | R Documentation |
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 |
.file |
(optional) A character vector of file locations |
syntax
, add_indicators
# create an indicator for the number of missing x in data set
I <- indicator(
sum(is.na(.)) # number of missing variables
, sum(is.na(.[c("x","y")])) # number of missing x and y
, mean(is.na(.)) # fraction of missing variables
, sum(x)
, mean(x)
)
dat <- data.frame(x=1:2, y=c(NA,1))
C <- confront(dat, I)
values(C)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.