rmg_bad_consonant_vowel_ratio: Rule V: consonants to vowels ratio

Description Usage Arguments Value Examples

View source: R/rmgarbage.R

Description

If a string has nothing but alphabetic characters, look at the number of consonants and vowels. If the number of one is less than 10% of the number of the other, then the string is garbage. From https://github.com/foodoh/rmgarbage

Usage

1

Arguments

x

a character vector

ratio

numeric, ratio of vowels to consonents

Value

Logical

Examples

1
2
3
4
5
 garbage_string_cv1 <- "azerytugino"
 garbage_string_cv2 <- "aaaaaaaaaaaaaaaaaax"

 rmg_bad_consonant_vowel_ratio(garbage_string_cv1) # FALSE
 rmg_bad_consonant_vowel_ratio(garbage_string_cv2) # TRUE

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