is_postcode: Function to check if a string is a valid postcode regardless...

View source: R/checker-functions.R

is_postcodeR Documentation

Function to check if a string is a valid postcode regardless of its formatting.

Description

With or without one space is permitted. Does not work with data where two spaces are included with 6 character postcodes. From the MIT licenced package Rbduk https://github.com/sama-ds/Rbduk/blob/main/R/is_postcode.R

Usage

is_postcode(data)

Arguments

data

string

Value

Logical

Examples

is_postcode("SW1a2nP")
is_postcode("SW1a 2nP")

nhs-r-community/LSOApop documentation built on May 31, 2024, 3:43 p.m.