mapBy2Groups: Multipanel Map of Locations, with Gaps

Description Usage Arguments Examples

View source: R/mapBy2Groups.R

Description

Multipanel map of locations, arranged according to membership in the first of two different groupings, with gaps (empty plot panels) between the first groups.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)
)

Arguments

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

lat

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

rlon

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

rlat

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

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

Examples

1
2
3
4
5
6
7
8
## 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)

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