na_approx: Linear interpolation of a vector

Description Usage Arguments Value Examples

View source: R/na_approx.R

Description

Linear interpolation of NAs in a vector using 'zoo::na.approx'. The NAs at the beginning or at the end are replaced by their first non NA neighbour

Usage

1
na_approx(vec)

Arguments

vec

A numeric vector with NAs

Value

A numeric vector without NA

Examples

1
na_approx(c(NA, 2, 3, NA, 5, 6, NA))

talegari/sidekicks documentation built on Sept. 26, 2018, 4:18 p.m.