geocacheR (version 0.1.0)

w3w: What 3 Words wrapper

Description

This function requires you to have a valid what3words API key called W3WAPIKey stored as an environment variable

Usage

w3w(x)

Arguments

x

A vector, or list, of words. Strings with dots in them will be split. After splitting, there must be a multiple of three words. Either a vector of words, for a single latitude/longitude pair, or a list of vectors for vectorised operations. This wrapper also accepts a single string of three words separated by full stops.

Value

a numeric vector of length 2, consisting of lat(itude) and lon(gitude)

Examples

Run this code
# NOT RUN {
w3w("president.always.lying")
w3w("unseen.academicals.football") ## returns NAs
w3w(list("special.tools.required", "cliffs.falling.rocks",
         "available.during.winter", "ultraviolet.light.required"))
w3w(c("protests", "memo", "consoles"))
# }

Run the code above in your browser using DataLab