Learn R Programming

VLTimeCausality (version 0.1.5)

plotTimeSeries: plotTimeSeries

Description

plotTimeSeries is a function for visualizing time series

Usage

plotTimeSeries(X, Y, strTitle = "Time Series Plot", TSnames)

Value

This function returns an object of ggplot class.

Arguments

X

is a 1st numerical time series

Y

is a 2nd numerical time series. If it is not supplied, the function plots only X.

strTitle

is a string of the plot title

TSnames

is a list of legend of X,Y where TSnames[1] is a legend of X and TSnames[2] is a legend of Y.

Examples

Run this code
# Generate simulation data
TS <- SimpleSimulationVLtimeseries()
# Run the function
plotTimeSeries(Y=TS$Y,X=TS$X)

Run the code above in your browser using DataLab