modify: Modify a data set

modifyR Documentation

Modify a data set

Description

Modify a data set

Usage

modify(dat, x, ref, ...)

## S4 method for signature 'data.frame,modifier,environment'
modify(dat, x, ref, logger = NULL, ...)

## S4 method for signature 'data.frame,modifier,ANY'
modify(dat, x, logger = NULL, ...)

## S4 method for signature 'data.frame,modifier,data.frame'
modify(dat, x, ref, logger = NULL, ...)

## S4 method for signature 'data.frame,modifier,list'
modify(dat, x, ref, logger = NULL, ...)

Arguments

dat

A data.frame

x

A modifier object containing modifying rules.

ref

A environment

...

Extra arguments.

logger

Optional. A lumberjack-compatible logger object.

Examples

m <- modifier( if (height < mean(height)) height <- 2*height
, if ( weight > mean(weight) ) weight <- weight/2  )
modify(women,m)

dcmodify documentation built on May 29, 2024, 4:50 a.m.

Related to modify in dcmodify...