Skip to contents

Builds a smoothing spline for y(x), where y may contain gaps (NAs). Ignores the NAs. The uses the spline to interpolate values at the same x coordinates, potentially filling in the gaps.

Usage

smooth_point(x, y, goodout = NULL, spar)

Arguments

x

x coordinate

y

y coordinate, potentially with NAs

goodout

Logical vector of where in the x coordinate to interpolate

spar

Smoothing parameter (see smooth.spline)

Value

The smoothed values