update_na_values | R Documentation |
This function replaces NAs in any columns in order to allow for the strategy
described in freeze_na_proportion
. NA values are replaced with
"___NA". No modifications done this way are saved and data returned by
harvest
if attach_weights=TRUE
will not be modified.
This is a private function and not intended for end-user use.
update_na_values(data, target, which_vars)
data |
A data frame (tibble) or matrix containing sample data,
specified as in |
target |
A list of named vectors, specified as in |
which_vars |
A boolean, numeric, or character vector specifying which variables to adjust in this manner. If boolean, all variables are selected. If character, those named variables are selected. If numeric, variables are selected based on numeric position amongst the target variables. |
An augmented version of data
with NAs of affected variables
replaced with "___NA", and the columns subset to those in
target
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.