na_extrapolate: Function to extrapolate leading and trailing 'NA's.

View source: R/na_extrapolate.R

na_extrapolateR Documentation

Function to extrapolate leading and trailing NAs.

Description

na_extrapolate interpolates leading and trailing NAs with a linear function.

Usage

na_extrapolate(x)

Arguments

x

Numeric or integer vector.

Value

Numeric vector.

Author(s)

Stuart K. Grange

See Also

na_interpolate

Examples


na_extrapolate(c(NA, 1:5, rep(NA, 5)))


skgrange/threadr documentation built on May 11, 2024, 12:16 p.m.