rmg_consecutive_four_identical: Rule R: four identical characters

Description Usage Arguments Value Examples

View source: R/rmgarbage.R

Description

If a string has 4 identical characters in a row, it is garbage. From https://github.com/foodoh/rmgarbage

Usage

1

Arguments

x

a character vector

n

integer, how identical consequtive characters to detect

Value

Logical

Examples

1
2
3
4
5
garbage_string_4c1 <-  "aaaaazzzezrertrg"
garbage_string_4c2 <-  "azertyuiopqsdfghj"

rmg_consecutive_four_identical(garbage_string_4c1) # TRUE
rmg_consecutive_four_identical(garbage_string_4c2) # FALSE

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