Description Usage Arguments Examples
Replace specific values in a column (usually NAs).
1 2 | replace_values(vars = numerics, values = NA, func, ...,
rename = function(x) x)
|
vars |
Function or formula that returns selected columns from a data.frame. Alternatively, character vector of column names. |
values |
Vector of values to replace. Default is NA. |
func |
Function to do the replacement (e.g. mean, median). Can be a constant, a user defined function or a formula, where a dot represents the column. |
... |
Other arguments passed to |
rename |
Function to rename the output variables (input: the original column name, output: the new column name). |
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.