Learn R Programming

soundgen (version 2.3.0)

intplNA: Interpolate NAs

Description

Internal soundgen function

Usage

intplNA(x, idx_na = NULL)

Arguments

x

numeric vector

idx_na

which(is.na(x))

Value

Returns the same numeric vector with NAs filled in by interpolation.

Details

Takes a numeric vector and fills in the NAs by linear interpolation in the middle and constant interpolation at the ends.

Examples

Run this code
# NOT RUN {
soundgen:::intplNA(c(NA, 405, 441, 460, NA, NA, NA, 480, 490, NA, NA))
# }

Run the code above in your browser using DataLab