mapMulti: Multipanel Map of Locations

Description Usage Arguments Examples

View source: R/mapMulti.R

Description

Multipanel map of locations, one map for each group.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
mapMulti(
  bygroup,
  sug = sort(unique(bygroup)),
  plottext = FALSE,
  ID = 1,
  emphasis = NULL,
  short = TRUE,
  lon,
  lat,
  samescale = TRUE,
  rlon = NULL,
  rlat = NULL,
  cushion = 0.1,
  IDcol = NULL,
  mapcol = "gray",
  boxcol = "gray",
  misscol = "brown",
  misstext = " - No sites",
  mar = c(0, 0, 2.5, 0)
)

Arguments

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(bygroup)).

plottext

Logical scalar indicating if text (TRUE) or symbols (FALSE, default) should be printed at each location.

ID

Vector, plot symbol (if plottext=FALSE) or text (if plottext=TRUE) to print on the map at each location, either of length 1 or the same length as bygroup, default 1.

emphasis

Logical vector, indicating observations that should be emphasized on the map, same length as bygroup, default NULL.

short

Logical scalar, indicating aspect of map area. If TRUE, the default, the mapped area is assumed to be wider (longitudinally) than tall. Used to better arrange multiple maps on a single page.

lon

A numeric vector of longitudes in decimal degrees.

lat

A numeric vector of latitudes in decimal degrees. Same length as lon.

samescale

Logical scalar, indicating if the same (TRUE, default) or different (FALSE) lon/lat scales should be used for all panels.

rlon

A numeric vector of length 2, range of longitudes to map, in decimal degrees. The default, NULL, means that the range of lon will be used, either over all panels (if samescale=TRUE) or for each panel separately (if samescale=FALSE).

rlat

A numeric vector of length 2, range of latitudes to map, in decimal degrees. The default, NULL, means that the range of lat will be used, either over all panels (if samescale=TRUE) or for each panel separately (if samescale=FALSE).

cushion

A numeric scalar indicating the amount of cushion to add to the rlon and rlat ranges in decimal degrees, default 0.1.

IDcol

A vector, the color used to map locations, same length as bygroup. If NULL, the default, a range of colors will be assigned automatically.

mapcol

A scalar, the color used to draw the map lines (e.g., lake boundary), default "gray".

boxcol

A scalar, the color used to draw the box around the map, default "gray".

misscol

A scalar, the color used to label maps with no locations in the given bygroup, default "brown".

misstext

A character scalar, the text used to label maps with no locations in the given bygroup, default " - No sites".

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, 2.5, 0).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
 mygroup <- c(1, 1, 1, 2, 2, 2, 3, 3, 3)
 myID <- LETTERS[1:9]
 mylon <- rnorm(9, mean=-82)
 mylat <- rnorm(9, mean=45)
 mapMulti(bygroup=mygroup, plottext=TRUE, ID=myID,
   emphasis=myID %in% c("G", "A"), cushion=0, lon=mylon, lat=mylat)
 mapMulti(bygroup=mygroup, sug=1:4, short=FALSE, lon=mylon, lat=mylat,
   samescale=FALSE)

## End(Not run)

JVAdams/EchoNet2Fish documentation built on Feb. 15, 2021, 4:27 a.m.