mapBy2Groups | R Documentation |
Multipanel map of locations, arranged according to membership in the first of two different groupings, with gaps (empty plot panels) between the first groups.
mapBy2Groups(df, lon, lat, rlon = range(lon, na.rm = TRUE), rlat = range(lat, na.rm = TRUE), nrows, nsymbols = 7, mar = c(0, 0, 3, 0))
df |
Data frame of values to plot, column names should identify membership in two groups, separated by a period, "group1.group2". |
lon |
Numeric vector, longitudes of locations to map,
in decimal degrees, same length as |
lat |
Numeric vector, latitudes of locations to map,
in decimal degrees, same length as |
rlon |
A numeric vector of length 2, range of longitudes to map,
in decimal degrees, default range( |
rlat |
A numeric vector of length 2, range of latitudes to map,
in decimal degrees, default range( |
nrows |
A numeric scalar, the number of rows of plot panels in the page. |
nsymbols |
An integer scalar, between 1 and 7 inclusive, the number of different symbol sizes/colors to plot, default 7. |
mar |
A numeric vector of length 4, the number of lines of margin c(bottom, left, top, right) around each plotted map plot, default c(0, 0, 3, 0). |
## Not run: mydf <- as.data.frame(matrix(rlnorm(35, 5), nrow=7, dimnames=list(NULL, c("Dog.large", "Dog.small", "Cat.large", "Cat.small", "Fish.all")))) mylon <- -c(83, 83, 80.4, 81) mylat <- c(45.4, 44.5, 45, 45.5) mapBy2Groups(df=mydf, lon=mylon, lat=mylat, nrows=3) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.