igr_to_ig {igr} | R Documentation |
Convert Irish grid references to Irish Grid coordinates
Description
igr_to_ig()
converts Irish grid references into a list of Irish Grid
(EPSG:29903) X and Y coordinates. The precision of each Irish grid reference
in metres can be returned.
Usage
igr_to_ig(x, coords = c("x", "y"), precision = NULL)
Arguments
x |
A character vector of Irish grid references. See |
coords |
A character vector of the names of the columns to contain the Irish Grid X and Y coordinates respectively. |
precision |
The name of the column to contain the precision of each Irish grid reference in metres, if required. |
Value
A list containing Irish Grid X and Y coordinates and, optionally, the precision in metres of each Irish grid reference. Invalid or missing Irish grid references return NA.
Examples
# A vector of Irish grid references of different precisions
v <- c("N8090", "D1234588800", "W34", "")
# Convert to Irish Grid coordinates
igr_to_ig(v)
# Specify column names
igr_to_ig(v, coords = c("e", "n"))
# Also return the precision in metres of each Irish grid reference
igr_to_ig(v, precision = "prec")
[Package igr version 0.1.1 Index]