na_interpolate: Function for interpolating 'NA's.

View source: R/na_locf.R

na_interpolateR Documentation

Function for interpolating NAs.

Description

na_interpolate wraps functions from the zoo package.

Usage

na_interpolate(x, na.rm = FALSE, spline = FALSE, extrapolate = FALSE)

Arguments

x

Input vector.

na.rm

Should leading NAs be removed?

spline

Should NAs be replaced using cubic splines rather than linear interpolation.

extrapolate

Should leading and preceeding NAs be extrapolated too? Only used for linear interpolation.

Value

Vector length of x.

Author(s)

Stuart K. Grange

See Also

na.approx


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