R/parse.R
parse_grid.Rd
Parse grid square codes
parse_grid(x, grid_size = NULL, strict = TRUE)
A character vector of grid square codes.
A grid size.
A scalar logical. Should the number of digits in the grid square code match a given number of digits? By default, TRUE.
TRUE
parse_grid("53394526313") #> Guessing, grid_size = "125m" #> <grid_125m[1]> #> [1] 53394526313 parse_grid("53394526313", "80km") #> <grid_80km[1]> #> [1] <NA> parse_grid("53394526313", "80km", strict = FALSE) #> <grid_80km[1]> #> [1] 5339