extract_postcode {healthyAddress}R Documentation

Extract the postcode from the suffix of a string

Description

Extract the postcode from the suffix of a string

Usage

extract_postcode(x)

Arguments

x

A character vector.

Value

An integer vector the same length as x, giving the postcode as it appears in the last 3 or 4 characters in each string. Returns NA_integer_ for other strings.

There is no guarantee made that the postcode is a real postcode.

Examples

extract_postcode("3000")
extract_postcode("Melbourne Vic 3000")


[Package healthyAddress version 0.4.3 Index]