peruvianGrid.assigner: Wrapper function peruvianGrid.assigner

View source: R/peruvianGrid.assigner.R

isopArea.assignerR Documentation

Wrapper function peruvianGrid.assigner

Description

Wrapper function peruvianGrid.assigner

Wrapper function peruvianGrid.assigner

Function to get main grid codes used at IMARPE from lon-lat information.

Usage

isopArea.assigner(dataPoints, colLon = NULL, colLat = NULL, old = FALSE)

marsdenSquare.assigner(dataPoints, colLon = NULL, colLat = NULL)

peruvianGrid.assigner(
  dataPoints,
  colLon = NULL,
  colLat = NULL,
  what = "isoparalitoral",
  ...
)

Arguments

dataPoints

data.frame which has Longitude and Latitude information.

colLon

Name of column which contains Longitude info.

colLat

Name of column which contains Latitude info. See Details for default values.

old

Do you prefer to use the old version of AIP (with errors, but historicaly used) or a new one obtained by applying a buffer over a coastline.

what

character string indicating the grid (i.e. the method) that will be used for the matching.

...

Extra arguments passed to the selected method.

Details

If colLon or colLat were NULL, the default values will depend on the class of dataPoints. So, if it was a matrix or a numeric vector, colLon and colLat will take values 1 or 2, respectively. Otherwise, if dataPoints is a data.frame, the values will be "lon" and "lat", respectively.

Value

A character vector with the code for ,depending on 'what', the assigned Marsden/Isoparalitoral grid.

Examples

## isopArea.assigner
exampleCoords <- data.frame(lon = runif(n = 10, min = -80, max = -78),
                            lat = runif(n = 10, min = -14, max = -12))

isopArea.assigner(dataPoints = exampleCoords)
## marsdenSquare.assigner
marsdenSquare.assigner(dataPoints = c(-84.32, -11.87))

LuisLauM/ruisu documentation built on March 26, 2024, 8:23 a.m.