mutate_cond: mutate_cond

Description Usage Arguments Value Examples

View source: R/mutate_cond.R

Description

A function that mutates data frames but only acts on the rows satisfying the condition

Usage

1
mutate_cond(.data, condition, ..., envir = parent.frame())

Arguments

.data

a dataframe or data table

condition

an expreessed condition to mutate on

...

additional conditions separated by commas

Value

a mutated dataframe

Examples

1
DF %>% mutate_cond(measure == 'exit', qty.exit = qty, cf = 0, delta.watts = 13)

willdebras/mutatemore documentation built on May 29, 2019, 12:03 a.m.