igr_is_valid {igr} | R Documentation |
Check if Irish grid references are valid
Description
igr_is_valid()
identifies valid Irish grid references.
Usage
igr_is_valid(x)
Arguments
x |
A character vector of Irish grid references. |
Details
Valid Irish grid references consist of a letter (other than I) optionally followed by both an easting and northing. The easting and northing must be of the same length of between 1 and 5 digits. There may be whitespace between the letter, easting and northing.
Value
A logical vector indicating the validity of each Irish grid reference.
Examples
# A vector of alternating valid and invalid Irish grid references
v <- c("N8090", "D 12 345 88800", "W34", "I30", "W", "A123", "B1234", "")
# Check validity of Irish Grid coordinates
igr_is_valid(v)
[Package igr version 0.1.1 Index]