moving_filter_plot_r: Moving (weighted) average filter plot (residual)

Description Usage Arguments Value Examples

View source: R/moving_filter_plot_r.R

Description

Plots the residual results of a moving (weighted) average filter routine.

Usage

1
2
moving_filter_plot_r(x, xlab = "X", ylab = "Residual data",
  filterlab = "Filter", plotk = "all")

Arguments

x

The result of using the moving_avg_filter() or moving_wt_filter() functions

xlab

The label for the x-axis

ylab

The label for the y-axis

filterlab

The label for the legend

plotk

A string for choosing what to plot (Default is "all")

Value

ggplot and plotly objects with the residual data

Examples

1
2
3
4
5
data(nautilus)
k = c(3, 5, 7, 9)
filt = moving_avg_filter(nautilus$x, nautilus$y, k)
moving_filter_plot_r(filt)
moving_filter_plot_r(filt, plotk = c("k_3", "k_9")) # plots residuals for filters of window 3 and 9

maxgav13/GMisc documentation built on Nov. 6, 2018, 2:50 a.m.