replaceValues: Replace values in columns in specified rows

View source: R/watanabe-df-manipulation.R

replaceValuesR Documentation

Replace values in columns in specified rows

Description

Updates named column(s) in df with given value(s) for the rows indicated by searchIndex and returns new copy of df.

Usage

replaceValues(df, searchIndex, ...)

Arguments

df

A dataframe

searchIndex

A logical vector with length equal to the number of rows in df in which the ith element is 'TRUE' if the ith row in df should be subject to replacement. Can be generated using searchDF.

...

Replacement columns and values, passed as consequetive arguments with the column name as the first argument and the new value as the second.

Value

A new copy up df with the specified rows and columns updated.


awatanabe/appr documentation built on Sept. 26, 2022, 8:04 a.m.