plot.features: Plotting the smoothed fucntion and its derivatives.

Description Usage Arguments Value Examples

View source: R/features.R

Description

Plots of the smoothed function and its first 2 derivatives.

Usage

1
2
## S3 method for class 'features'
plot(x, ...)

Arguments

x

an object of class(features) that is returned by the features() function.

...

Additional arguments to be passed to the plot() function

Value

A plot is shown in a 2 x 2 layout, where the top 2 frames are the same and they depict the raw data and the smoothed function. The bottom left panel shows the smoothed first derivative, and the bottom right panel depicts the smoothed second derivative.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Estimating the smooth and the derivatives of a noisy and discretely sampled function. 
n <- 200
x <- sort(runif(n))
y <- exp(-0.2 * sin(2*pi*x)) + rnorm(n, sd=0.05)

ans <- features(x, y)
plot(ans)

ans.sm <- features(x, y, smoother="smooth.spline")
plot(ans.sm)

features documentation built on May 2, 2019, 9:23 a.m.