pl.2tsgg {YRmisc}R Documentation

Time series plot for two variables with ggplot2

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

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

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

[Package YRmisc version 0.1.6 Index]