na_mid: Replace missing values with linear interpolation or midpoints

Description Usage Arguments Examples

View source: R/RcppExports.R

Description

Replace missing values with linear interpolation or midpoints

Usage

1
2
3

Arguments

x

a vector.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
na_interp(c(1, NA, NA, 4))
na_interp(c(1, 2, 3, NA, NA, 6))
na_interp(c(1, NA, 3, NA, NA, 6, NA))
na_interp(c(NA, NA, 1, NA, 3, NA, NA, 6))
na_interp(c(0, rep(NA, 9), 1))


na_mid(c(1, NA, NA, 4))
na_mid(c(1, 2, 3, NA, NA, 6))
na_mid(c(1, NA, 3, NA, NA, 6, NA))
na_mid(c(NA, NA, 1, NA, 3, NA, NA, 6))

twolodzko/misster documentation built on May 24, 2019, 2:54 p.m.