View source: R/utils-numeric.R
setNaToZero | R Documentation |
This function replaces NAs in numeric columns with 0.
setNaToZero(df, cols = NULL)
cols |
vector of column names for which the NA replacement should occur. Default is all numeric columns. |
x |
data.table, data.frame, or list |
x with desired NAs replaced with 0.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.