R/RcppExports.R

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

setup <- function() {
    invisible(.Call(`_poster_setup`))
}

end <- function() {
    invisible(.Call(`_poster_end`))
}

#'@title Normalise postal addresses
#'@description \code{normalise_addr} takes street
#'addresses and normalises them within the context of a specific
#'country or language. It currently recognises 60 different locales.
#'
#'@param addresses a character vector of addresses to normalise
#'
#'@return a character vector of normalised addresses.
#'
#'@examples
#'# Normalise an English address!
#'\dontrun{
#'normalise_addr("fourty seven love lane pinner")
#'# [1] "47 love lane pinner"
#'}
#'# Normalise a French one
#'\dontrun{
#'normalise_addr("Quatre-vignt-douze Ave des Champs-Élysées")
#'# "92 avenue des champs-elysees"
#'}
#'@seealso \code{\link{parse_addr}} for parsing addresses.
#'@export
normalise_addr <- function(addresses) {
    .Call(`_poster_normalise_addr`, addresses)
}

#'@title Parse street addresses
#'@description \code{parse_addr} parses street addresses into
#'their component parts, producing the addresses' house name,
#'number, road and suburb, city district and city, state district
#'and state, postal code, and country.
#'
#'@param addresses a character vector of addresses to parse.
#'
#'@return a data.frame of 20 columns; \code{house}, \code{category},
#'\code{near}, \code{house_number}, \code{road}, \code{unit},
#'\code{level}, \code{staircase}, \code{entrance}, \code{po_box},
#'\code{suburb}, \code{city_district}, \code{city},
#'\code{state_district}, \code{state}, \code{postal_code},
#'\code{country_region}, \code{country}, \code{world_region}. 
#'Values not found in the address are represented
#'with \code{NA}s
#'
#'@examples
#'\dontrun{
#'str(parse_addr("781 Franklin Ave Crown Heights Brooklyn NYC NY 11216 USA"))
#'}
#'# 'data.frame':	1 obs. of  10 variables:
#'#   $ house          : chr NA
#'#   $ category       : chr NA
#'#   $ near           : chr NA
#'#   $ house_number   : chr "781"
#'#   $ road           : chr "franklin ave"
#'#   $ unit           : chr NA
#'#   $ level          : chr NA
#'#   $ staircase      : chr NA
#'#   $ entrance       : chr NA
#'#   $ po_box         : chr NA
#'#   $ suburb         : chr "crown heights"
#'#   $ city_district  : chr "brooklyn"
#'#   $ city           : chr "nyc"
#'#   $ state_district : chr NA
#'#   $ state          : chr "ny"
#'#   $ postal_code    : chr NA
#'#   $ country_region : chr NA
#'#   $ country        : chr "usa"
#'#   $ world_region   : chr NA
#'
#'@seealso \code{\link{normalise_addr}} for normalising addresses.
#'
#'@export
parse_addr <- function(addresses) {
    .Call(`_poster_parse_addr`, addresses)
}

get_elements_ <- function(addresses, element) {
    .Call(`_poster_get_elements_`, addresses, element)
}

set_elements_ <- function(addresses, replacement, element) {
    .Call(`_poster_set_elements_`, addresses, replacement, element)
}
Ironholds/poster documentation built on May 7, 2019, 6:41 a.m.