powered by
Impute missing values
impute_missing( data, cols = NULL, method = "linear", group = NULL, date_col = NULL, max_gap = NULL, verbose = FALSE )
A data frame with imputed values.
A data frame or matrix.
Columns to impute. If NULL, all numeric columns are used.
NULL
"linear", "locf", "nocb", "mean", or "median".
Optional grouping column.
Time column.
Not implemented; ignored with a warning.
Logical.
1. Example data is from https://smear.avaa.csc.fi/download. It includes particle number concentrations in SMEAR I Varrio forest.
impute_missing(data[1:100, c(1, 4, 17:19)], cols = 3:5, method = "locf")
Run the code above in your browser using DataLab