mutate_cond {DSSAT} | R Documentation |
Convenience function that allows mutating a subset of rows
mutate_cond(.data, condition, ..., envir = parent.frame())
.data |
a tibble |
condition |
a logical vector for subsetting rows of '.data' |
... |
Name-value pairs of expressions to be evaluated by 'mutate()' |
envir |
environment within which expressions should be evaluated |
Original code taken from https://stackoverflow.com/questions/34096162/dplyr-mutate-replace-several-columns-on-a-subset-of-rows
a tibble with specified rows modified