plot_ts: Plot a time series chart

View source: R/graphics.R

plot_tsR Documentation

Plot a time series chart

Description

The function receives six variables as a parameter, which are obj and y, yadj, main and xlabels. The graph is plotted with 3 lines: the original series (in black), the adjusted series (in blue) and the predicted series (in green)

Usage

plot_ts(x = NULL, y, label_x = "", label_y = "", color = "black")

Arguments

x

input variable

y

output variable

label_x

x-axis label

label_y

y-axis label

color

color for time series

Value

ggplot graphic

Examples

x <- seq(0, 10, 0.25)
data <- data.frame(x, sin=sin(x))
head(data)

grf <- plot_ts(x = data$x, y = data$sin, color=c("red"))
plot(grf)

daltoolbox documentation built on May 29, 2024, 1:57 a.m.