rmg_uppercase_lowercase_ratio: Upper to lowercase ratio

Description Usage Arguments Value Examples

View source: R/rmgarbage.R

Description

If the number of uppercase characters in a string is greater than the number of lowercase characters, and if the number of uppercase characters is less than the total number of characters in the string, it is garbage. From https://ladyissy.github.io/OCR/

Usage

1

Arguments

x

a character vector

Value

Logical

Examples

1
2
3
4
5
garbage_string_ul1 <- "UNESCO"
garbage_string_ul2 <- "POTAto"

rmg_uppercase_lowercase_ratio(garbage_string_ul1) # FALSE
rmg_uppercase_lowercase_ratio(garbage_string_ul2) # TRUE

benmarwick/rmgarbage documentation built on April 19, 2020, 6:06 p.m.