Learn R Programming

hyfo (version 1.3.6)

getEnsem_comb: Combine ensembles together

Description

Combine ensembles together

Usage

getEnsem_comb(..., list = NULL, nrow = 1, legend = TRUE, x = "", y = "", title = "", output = FALSE)

Arguments

...
different ensembles generated by getHisEnsem(, output = 'ggplot') or getFrcEnsem(, output = 'ggplot'), see details.
list
If input is a list containing different ggplot data, use list = inputlist.
nrow
A number showing the number of rows.
legend
A boolean representing whether you want the legend. Sometimes when you combine plots, there will be a lot of legends, if you don't like it, you can turn it off by setting legend = FALSE, default is TRUE.
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.

Value

A combined ensemble plot.

References

  • H. Wickham. ggplot2: elegant graphics for data analysis. Springer New York, 2009.
  • Santander Meteorology Group (2015). downscaleR: Climate data manipulation and statistical downscaling. R package version 0.6-0. https://github.com/SantanderMetGroup/downscaleR/wiki

Examples

Run this code
data(testdl)

a <- testdl[[1]]

# Choose example from "1994-2-4" to "1996-1-4"


b1<- getHisEnsem(a, example = c('1995-2-4', '1996-1-4'), plot = 'cum', output = 'ggplot',
                 name = 1)

b2 <- getHisEnsem(a, example = c('1995-4-4', '1996-3-4'), plot = 'cum', output = 'ggplot',
                 name = 2)

getEnsem_comb(b1, b2)
getEnsem_comb(list = list(b1, b2), nrow = 2)

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

Run the code above in your browser using DataLab