plot_spectrum: Plot the periodogram of a daily time series
Description
Plot the periodogram of a daily time series
Usage
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
Details
Plot uses ggplot2 and can be changed accordingly. The spectrum is build around the spec.pgram() function
Examples
Run this code# NOT RUN {
x <- daily_sim(3)$original
plot_spectrum(x)
# }
Run the code above in your browser using DataLab