na.locf: Deprecated use 'na_locf' instead.

View source: R/deprecated_defunct.R

na.locfR Documentation

Deprecated use na_locf instead.

Description

na.locf is replaced by na_locf. The functionality stays the same. The new name better fits modern R code style guidelines (which prefer _ over . in function names).

Usage

na.locf(x, option = "locf", na.remaining = "rev", maxgap = Inf, ...)

Arguments

x

Numeric Vector (vector) or Time Series (ts) object in which missing values shall be replaced

option

Algorithm to be used. Accepts the following input:

  • "locf" - for Last Observation Carried Forward (default choice)

  • "nocb" - for Next Observation Carried Backward

maxgap

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.


imputeTS documentation built on Sept. 9, 2022, 9:05 a.m.