na_replace
instead.na.replace is replaced by na_replace
.
The functionality stays the same. The new name better fits modern R code
style guidelines (which prefer _ over . in function names).
na.replace(x, fill = 0, maxgap = Inf, ...)
Numeric Vector (vector
) or Time Series (ts
)
object in which missing values shall be replaced
Value used to replace the missing values
Maximum number of successive NAs to still perform imputation on. Default setting is to replace all NAs without restrictions. With this option set, consecutive NAs runs, that are longer than 'maxgap' will be left NA. This option mostly makes sense if you want to treat long runs of NA afterwards separately.