| add_indicators {validate} | R Documentation |
Compute and add externally defined indicators to data frame. If necessary, values are recycled over records.
add_indicators(dat, x)
dat |
|
x |
|
dat with extra columns defined by x attached.
ii <- indicator( hihi = 2*sqrt(height) , haha = log10(weight) , lulz = mean(height) , wo0t = median(weight) ) # note: mean and median are repeated add_indicators(women, ii) # compute indicators first, then add out <- confront(women, ii) add_indicators(women, out)