R/RcppExports.R

Defines functions parse_nested_records gapfill_postcodes last_cpp is_postcode_complete_cpp is_sector_cpp is_district_cpp find_postcodes_in_string_cpp to_upper

Documented in gapfill_postcodes parse_nested_records

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

to_upper <- function(str) {
    .Call(`_sabre_to_upper`, str)
}

find_postcodes_in_string_cpp <- function(s) {
    .Call(`_sabre_find_postcodes_in_string_cpp`, s)
}

is_district_cpp <- function(s) {
    .Call(`_sabre_is_district_cpp`, s)
}

is_sector_cpp <- function(s) {
    .Call(`_sabre_is_sector_cpp`, s)
}

is_postcode_complete_cpp <- function(s) {
    .Call(`_sabre_is_postcode_complete_cpp`, s)
}

last_cpp <- function(v) {
    .Call(`_sabre_last_cpp`, v)
}

#' @title gapfill_postcodes
#' @description
#' Find postcodes in address vector when missing or incomplete in postcode vector.
#' @name gapfill_postcodes
#' @param postcode a vector of strings (same size as address)
#' @param address a vector of strings (same size as postcode)
#'
#' @export
gapfill_postcodes <- function(postcode, address) {
    .Call(`_sabre_gapfill_postcodes`, postcode, address)
}

#' @title parse_nested_records
#' @description
#' Deduplicate and optionally change separators in nested records.
#' @name parse_nested_records
#' @param s a vector of strings
#' @param sep_from string separator in input strings
#' @param sep_to string separator in output strings
#'
#' @export
parse_nested_records <- function(s, sep_from, sep_to) {
    .Call(`_sabre_parse_nested_records`, s, sep_from, sep_to)
}
xavier-gilbert/sabre documentation built on May 7, 2021, 12:40 p.m.