Description Usage Arguments Value Source Examples
Transform NA values to Zeros, which can be helpful in data cleaning for loss amounts
1 |
df |
a data frame or indicated column of the data frame (named list) |
... |
a character vector optionally supplied as a c(...) vector |
returns the column of interest with transformed missing NA values to 0
http://stackoverflow.com/questions/2641653/pass-a-data-frame-column-name-to-a-function
1 2 | df = data.frame("x" = 1:3, "missings" = rep(NA, 3))
df$missings <- missing_to_zero(df, "missings")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.