plotTS_comb: Combine time seires plot together

View source: R/analyzeTS.R

plotTS_combR Documentation

Combine time seires plot together

Description

Combine time seires plot together

Usage

plotTS_comb(
  ...,
  nrow = 1,
  type = "line",
  list = NULL,
  x = "Date",
  y = "",
  title = "",
  output = FALSE
)

Arguments

...

different time series plots generated by plotTS(, output = 'ggplot'), refer to details.

nrow

A number showing the number of rows.

type

A string showing 'line' or 'bar'.

list

If input is a list containing different ggplot data, use llist = inputlist.

x

A string of x axis name.

y

A string of y axis name.

title

A string of the title.

output

A boolean, if chosen TRUE, the output will be given. NOTE: yOU HAVE TO PUT A list = , before your list.

Details

..., representing different ouput file generated by plotTS(, output = 'ggplot'), name = yourname, different names must be assigned when generating different output.

e.g. a1, a2, a3 are different files generated by plotTS(, output = 'ggplot'), name = yourname, you can set plotTS(a1,a2,a3) or plotTS(list = list(a1,a2,a3))

Value

A combined time series plot.

References

  • H. Wickham. ggplot2: elegant graphics for data analysis. Springer New York, 2009.

Examples

a1 <- plotTS(testdl[[1]], output = 'ggplot', name = 1)
a2 <- plotTS(testdl[[2]], output = 'ggplot', name = 2)

plotTS_comb(a1, a2)
plotTS_comb(list = list(a1, a2), y = 'y axis', nrow = 2)

# More examples can be found in the user manual on https://yuanchao-xu.github.io/hyfo/


hyfo documentation built on Aug. 16, 2023, 5:08 p.m.