smoothloess: Predict smooth from a fit

View source: R/smooth.R

smoothloessR Documentation

Predict smooth from a fit

Description

Predict smooth from a fit

Usage

smoothloess(y, span)

Arguments

y

numeric vector

span

The span of the loess fit

Examples

## Not run: 
library(ggplot2)
x <- seq(0, 6 * pi, by = .02)
y <- 5.5 * sin(x) + rnorm(length(x))


ggplot() +
  geom_point(aes(x = 1:length(y), y = y), shape = 1) +
  geom_line(aes(x = 1:length(y), y = smoothloess(y, .05)),
    color = "red"
  ) +
  geom_line(aes(x = 1:length(y), y = raw_sig_smooth(y, .05)),
    color = "blue"
  )

## End(Not run)

heike/bulletxtrctr documentation built on March 8, 2024, 7:41 p.m.