mapAppor: Multipanel Map of Locations

Description Usage Arguments See Also Examples

View source: R/mapAppor.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
mapAppor(
  MTgroup,
  ACgroup,
  sug = sort(unique(c(MTgroup, ACgroup))),
  MTID,
  ACID,
  short = TRUE,
  MTlon,
  MTlat,
  AClon,
  AClat,
  rlon = range(MTlon, AClon, na.rm = TRUE),
  rlat = range(MTlat, AClat, na.rm = TRUE),
  MTIDcol = NULL,
  mapcol = "gray",
  boxcol = "gray",
  misscol = "brown",
  misstext = " - No tows",
  mar = c(0, 0, 2.5, 0)
)

Arguments

MTgroup

Vector, identifying the group membership of the midwater trawl tow locations to be mapped. The unique values of MTgroup should be a subset of ACgroup.

ACgroup

Vector, identifying the group membership of the acoustic transect locations to be mapped.

sug

Vector, identifying the unique groups to which locations may belong, default sort(unique(c(MTgroup, ACgroup))).

MTID

Vector, unique identification of each midwater trawl tow, same length as MTgroup.

ACID

Vector, identification of acoustic transects used to apportion each acoustic transect, same length as ACgroup.

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.

MTlon

Numeric vector, longitudes of midwater trawl tow locations to map, in decimal degrees, same length as MTgroup.

MTlat

Numeric vector, latitudes of midwater trawl tow locations to map, in decimal degrees, same length as MTgroup.

AClon

Numeric vector, longitudes of acoustic transect locations to map, in decimal degrees, same length as ACgroup.

AClat

Numeric vector, latitudes of acoustic transect locations to map, in decimal degrees, same length as ACgroup.

rlon

A numeric vector of length 2, range of longitudes to map, in decimal degrees, default range(MTlon, AClon, na.rm=TRUE).

rlat

A numeric vector of length 2, range of latitudes to map, in decimal degrees, default range(MTlat, AClat, na.rm=TRUE).

MTIDcol

A scalar, the color used to map the midwater trawl locations, same length as MTgroup. 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 tows".

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

See Also

mapMulti

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
 # acoustic transects
 agroup <- c("Main", "Bay")[c(1, 1, 1, 1, 2, 2, 2)]
 aID <- c("A", "B", "B", "B", "C", "C", "D")
 alon <- -c(83.5, 82.6, 82, 82, 80.6, 80.5, 81.3)
 alat <- c(45.6, 44.5, 44.6, 44.1, 45.3, 44.8, 45.7)

 # midwater trawls
 mgroup <- c("Main", "Bay")[c(1, 1, 2, 2)]
 mID <- c("A", "B", "C", "D")
 mlon <- -c(83, 83, 80.4, 81)
 mlat <- c(45.4, 44.5, 45, 45.5)

 # illustrate assignment of midwater trawl tows to acoustic transects
 mapAppor(MTgroup=mgroup, ACgroup=agroup, MTID=mID, ACID=aID, MTlon=mlon,
   MTlat=mlat, AClon=alon, AClat=alat, rlon=c(-84, -80), rlat=c(43, 46))
 
## End(Not run)

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