centroidAssigner: Returns centroid values from grid codes.

View source: R/centroidAssigner.R

centroidAssignerR Documentation

Returns centroid values from grid codes.

Description

This function takes a vector of grid codes and returns centroids (center of mass) in lon-lat values.

Usage

centroidAssigner(code, what = "isoparalitoral", ...)

Arguments

code

Vector with grid codes.

what

character indicating whether AIP or Marsden squares are going to be used as reference.

...

Extra arguments passed to selected method.

Details

For what = "isoparalitoral" (default), it allows to use argument old, for specifying whether to use old AIP shape (AIPShapefile_old) o the new (AIPShapefile_new).

Examples

isopCodes <- c(1050, 4043, 17073, 27103)
centroidAssigner(code = isopCodes, what = "isoparalitoral")

marsdenCodes <- c("A6", "B8", "c12")
centroidAssigner(code = marsdenCodes, what = "marsden")

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