na_approx: Linear interpolation of a vector

Description Usage Arguments Value Examples

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 May 30, 2019, 8:40 a.m.