validate_olc {olctools} | R Documentation |
These functions allow a useR to check whether OLCs they've
been provided are valid or not. valid_short
identifies whether
a vector of OLCs are valid "short" codes; valid_long
identifies
whether OLCs are valid "long" codes, and valid_full
identifies
whether OLCs are valid, full stop.
validate_olc(codes) validate_short(codes) validate_full(codes)
codes |
a character vector containing Open Location Codes. |
a vector of TRUE and FALSE values, where TRUE corresponds to a valid code and FALSE an invalid.
decode_olc
and encode_olc
for creating
and resolving valid Open Location Codes.
#Validate that a particular OLC is valid validate_olc("WC2345+G6g") #[1] TRUE #It is! Is it a short? validate_short("WC2345+G6g") #[1] TRUE #Yep! #So it's not full? validate_full("WC2345+G6g") #[1] FALSE #Nope!