nums_to_NA {eHDPrep} | R Documentation |
Replace numeric values in numeric columns with NA
Description
Replaces specified numbers in numeric columns with NA
.
Usage
nums_to_NA(data, ..., nums_to_replace = NULL)
Arguments
data |
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). |
... |
< |
nums_to_replace |
numeric vector of values to be replaced with
|
Details
Columns to process can be specified in ...
or the function will be
applied to all numeric columns.
Value
data
with specified values replaced with NA
Examples
data(example_data)
# replace all 1,2, and 3 from tumoursize and patient_id with NA.
nums_to_NA(data = example_data, tumoursize, patient_id, nums_to_replace = c(1,2,3))
[Package eHDPrep version 1.3.3 Index]