Names <- c('Raul', 'Ra`l', 'Torres,Raul', 'Torres, Raul')
# confusion in character sets can create
# names like Names[2]
chk <- grepNonStandardCharacters(Names)
stopifnot(
all.equal(chk, 2)
)
chkv <- grepNonStandardCharacters(Names, TRUE)
stopifnot(
all.equal(chkv, Names[2])
)
Run the code above in your browser using DataLab