pl.2tsgg: Time series plot for two variables with ggplot2

Description Usage Arguments Examples

View source: R/pl.2tsgg.R

Description

Plotting two time series in one plot, with title and label. If both variables are time series object, they will be merged by time. If both variables are not time series object, they will be merged by order. The first variable is set to be a solid line and the second variable is set to be a dashed line. If the variables are of different type a warning message will be given.

Usage

1
pl.2tsgg(ts1,ts2,title,ylab)

Arguments

ts1

:a time series variable or a numeric variable

ts2

:a time series variable or a numeric variable

title

:title for the plot

ylab

:y-axis label

Examples

1
2
3
DAX <- EuStockMarkets[,1]
FTSE <- EuStockMarkets[,4]
pl.2tsgg(DAX,FTSE, "Times Series Plot of DAX and FTSE", "Index")

Example output



YRmisc documentation built on March 25, 2020, 5:13 p.m.

Related to pl.2tsgg in YRmisc...