Learn R Programming

hyfo (version 1.3.4)

getSpatialMap_comb: Combine maps together

Description

Combine maps together

Usage

getSpatialMap_comb(..., list = NULL, nrow = 1, x = "", y = "",
  title = "", output = FALSE)

Arguments

...
different maps generated by getSpatialMap(, 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.
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 map.

Details

For getSpatialMap_comb, the maps to be compared should be with same size and resolution, in other words, they should be fully overlapped by each other. If they have different resolutions, use interpGridData{ecomsUDG.Raccess} to interpolate.

References

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

Examples

Run this code
data(tgridData)# the result of \code{loadGridData{ecomsUDG.Raccess}}
#The output should be 'ggplot'
a1 <- getSpatialMap(tgridData, method = 'summer', output = 'ggplot', name = 'a1')
a2 <- getSpatialMap(tgridData, method = 'winter', output = 'ggplot', name = 'a2')
a3 <- getSpatialMap(tgridData, method = 'mean', output = 'ggplot', name = 'a3')
a4 <- getSpatialMap(tgridData, method = 'max', output = 'ggplot', name = 'a4')
getSpatialMap_comb(a1, a2)

# or you can put them into a list.
getSpatialMap_comb(list = list(a1, a2), 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