mutate_geocode: Add latitude and longitude columns to a data frame of...

View source: R/mutate_geocode.R

mutate_geocodeR Documentation

Add latitude and longitude columns to a data frame of addresses

Description

Add latitude and longitude columns to a data frame of addresses

Usage

mutate_geocode(
  DT,
  flat_number = NULL,
  number_first = NULL,
  building_name = NULL,
  street_name = NULL,
  street_type = NULL,
  postcode = NULL,
  new_names = c("lat", "lon"),
  approx = 0L,
  overwrite = FALSE
)

Arguments

DT

A data.frame to which columns will be added.

flat_number, number_first, building_name, street_name, street_type, postcode

Columns quoted or unquoted to be passed to geocode. If NULL, DT must the columns spelled the same as the arguments here.

new_names

Character vector of length-2 specifying the new names in the resulting data.frame for the latitude and longitude respectively.

approx

See geocode.

overwrite

If new_names are present in DT, should they be overwritten?


HughParsonage/PSMA documentation built on May 21, 2022, 10:16 p.m.