str_remove_ordinal: Remove Mixed Ordinal Numbers with Text Representation

str_remove_ordinalR Documentation

Remove Mixed Ordinal Numbers with Text Representation

Description

Removes mixed text/numeric ordinal numbers (i.e. "1st", "2nd", "23rd"). This function was inspired by the replace_ordinal() function in the textclean package, and re-uses pieces of its code.

Usage

str_remove_ordinal(string)

Arguments

string

A character vector

num_paste

A logical. If TRUE, the elements of larger numbers are separated with spaces. If FALSE, the elements will be joined without spaces.

A

logical. If TRUE, ordinal numbers are removed from string

...

Ignored.

Details

Currently only implemented for ordinal values 1 through 100.


jesse-smith/coviData documentation built on Jan. 14, 2023, 11:08 a.m.