appendPosition: Append positions

View source: R/DataPrep.R

appendPositionR Documentation

Append positions

Description

Appends columns with positions to a data table, based on an area code.

Coordinates are retrieved from a SpatialPolygonsDataFrame and not calculated the exact defintion of the coordinates depend on how the polygons were constructed.

Datum and projection is not enforced, but a warning is issued if 'areaPolygons' does not pass some checks to verify that it is not a planar projection.

Usage

appendPosition(
  table,
  areaPolygons,
  areaName,
  latColName,
  lonColName,
  StratumName = "StratumName"
)

Arguments

table

data.table to be annotated.

areaPolygons

SpatialPolygonsDataFrame

areaName

name of column that identifies the area in 'table'

latColName

name of the latitdue column to be appended to 'table'

lonColName

name of the longitude column to be appended to 'table'

StratumName

name of the column in 'areaPolygons' that identifies the area.

Value

'table' with the positions appended in the columns 'latColName' and 'lonColName'.


StoXProject/RstoxFDA documentation built on Jan. 13, 2024, 12:32 a.m.