Description Usage Arguments Examples
Draw a map using different colored symbols for different groups.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
bygroup |
Vector, identifying the group membership of the locations to be mapped. |
sug |
Vector, identifying the unique groups to which locations may belong,
default sort(unique( |
addMean |
Logical scalar indicating if group names should be added to plot at the mean location of each bygroup, default TRUE. |
lon |
A numeric vector of longitudes in decimal degrees. |
lat |
A numeric vector of latitudes in decimal degrees.
Same length as |
rlon |
A numeric vector of length 2, range of longitudes to map,
in decimal degrees, default is the range of |
rlat |
A numeric vector of length 2, range of latitudes to map,
in decimal degrees, default is the range of |
cushion |
A numeric scalar indicating the amount of cushion to add to the |
colorz |
A vector of colors to use, either of length 1 or the same length as
|
pch |
A vector of plotting characters or symbols, either of length
1 or the same length as |
cex |
A numeric vector giving the amount by which plotting characters and
symbols should be scaled relative to the default, either of length
1 or the same length as |
mapcol |
A scalar, the color used to draw the map lines (e.g., lake boundary), default "gray". |
mar |
A numeric vector of length 4, the number of lines of margin c(bottom, left, top, right) around the plotted map plot, default c(0, 0, 0, 0). |
1 2 3 4 5 6 7 | ## Not run:
mygroup <- c(1, 1, 1, 2, 2, 2, 3, 3, 3)
mylon <- -c(81.1, 81.2, 80.5, 83, 82.2, 82.7, 82.7, 82, 82.2)
mylat <- c(45.7, 45.4, 45, 45.5, 45.4, 45, 44.4, 44.4, 43.9)
mapByGroup(bygroup=mygroup, lon=mylon, lat=mylat, cushion=0.7)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.