Description Usage Arguments Details Value Examples
Replace missing values
1 | na_replace(df, how = NULL, value = NULL)
|
df |
The data set(data.frame or vector) for which replacements are required |
how |
How should missing values be replaced? One of ffill, samples,value or any other known method e.g mean, median, max ,min. The default is NULL meaning no imputation is done. For character vectors, the use of 'get_mode' is also supported. No implementation for class factor(yet). |
value |
If how is set to value, this allows the user to provide a specific fill value for the NAs. |
This function currently does not support grouping although this may be achieved with some inaccuracies using grouping functions from other packages.
A data.frame object with missing values replaced.
1 | head(na_replace(airquality,how="value", value="Missing"))
|
Loading required package: caret
Loading required package: lattice
Loading required package: ggplot2
Loading required package: Metrics
Attaching package: ‘Metrics’
The following objects are masked from ‘package:caret’:
precision, recall
Loading required package: e1071
Welcome to manymodelr.
For the latest development version,
please see: https://www.github.com/Nelson-Gon/manymodelr.
Please file issues at https://github.com/Nelson-Gon/manymodelr/issues
Ozone Solar.R Wind Temp Month Day
1 41 190 7.4 67 5 1
2 36 118 8.0 72 5 2
3 12 149 12.6 74 5 3
4 18 313 11.5 62 5 4
5 Missing Missing 14.3 56 5 5
6 28 Missing 14.9 66 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.