str_remove_ordinal: Remove Mixed Ordinal Numbers with Text Representation

View source: R/server-std_names.R

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/schedules documentation built on July 21, 2022, 9:40 a.m.