powered by
Modify a data set
modify(dat, x, ref, ...)# S4 method for data.frame,modifier,environment modify(dat, x, ref, logger = NULL, ...)# S4 method for data.frame,modifier,ANY modify(dat, x, logger = NULL, ...)# S4 method for data.frame,modifier,data.frame modify(dat, x, ref, logger = NULL, ...)# S4 method for data.frame,modifier,list modify(dat, x, ref, logger = NULL, ...)
# S4 method for data.frame,modifier,environment modify(dat, x, ref, logger = NULL, ...)
# S4 method for data.frame,modifier,ANY modify(dat, x, logger = NULL, ...)
# S4 method for data.frame,modifier,data.frame modify(dat, x, ref, logger = NULL, ...)
# S4 method for data.frame,modifier,list modify(dat, x, ref, logger = NULL, ...)
A data.frame
data.frame
A modifier object containing modifying rules.
modifier
A environment
environment
Extra arguments.
Optional. A lumberjack-compatible logger object.
lumberjack
m <- modifier( if (height < mean(height)) height <- 2*height , if ( weight > mean(weight) ) weight <- weight/2 ) modify(women,m)
Run the code above in your browser using DataLab