standardise_titles: Standardise titles

View source: R/standardise_titles.R

standardise_titlesR Documentation

Standardise titles

Description

Standardises words in a character title variable to improve readability, facilitate string matching and enable more accurate comparisons for variables in different datatsets.

Usage

standardise_titles(s)

standardize_titles(s)

Arguments

s

A string

Details

The function capitalises words in the strings passed to it. It trims white spaces from the start, middle and end of the strings. Removes ambiguous punctions and symbols from strings. All the strings are transformed into to ASCII character encoding. Written numbers in ordinal form are transformed into numerical form.

Value

A capitalised, trimmed and standardised string

Examples

e <- standardise_titles("A treaty concerning things")
e==c("A Treaty Concerning Things")

globalgov/qCreate documentation built on April 27, 2023, 3:27 a.m.