fill_spline {transx}R Documentation

Fill with "cubic spline interpolation"

Description

Fill with "cubic spline interpolation"

Usage

fill_spline(body, idx, ...)

Arguments

body

⁠[numeric vector]⁠

The body of the vector.

idx

⁠[integer vector]⁠

the index to replace with.

...

Further arguments passed to ⁠\link[stats]{spline}⁠

Value

Returns a vector with the same class and attributes as the input vector.

Examples

x <- c(5,3,NA,2,5)
fill_spline(x, 3)

[Package transx version 0.0.1 Index]