plot_spectrum: Plot the periodogram of a daily time series

Description Usage Arguments Details Author(s) Examples

View source: R/plot_spectrum.R

Description

Plot the periodogram of a daily time series

Usage

1
2
3
4
5
6
7
plot_spectrum(
  x,
  xlog = FALSE,
  size = 1,
  color = "black",
  vline_color = "#6F87B2"
)

Arguments

x

xts or ts, daily timeseries

xlog

should x-axis be log transformed

size

linesize

color

color of line

vline_color

color of vertical lines

Details

Plot uses ggplot2 and can be changed accordingly. The spectrum is build around the spec.pgram() function

Author(s)

Daniel Ollech

Examples

1
2
x <- daily_sim(3)$original
plot_spectrum(x)

dsa documentation built on June 21, 2021, 9:07 a.m.