Open emantzo opened 2 years ago
Hi! How could I use assertCharacter to check if a string contains any element that is not allowed? For example , I want to make sure that the string vector contains only letters.
Is it possible? Thank you!
See the pattern argument, e.g.:
pattern
checkmate::assert_character(c("a", "a123"), pattern = "^[[:alpha:]]+$")
Hi! How could I use assertCharacter to check if a string contains any element that is not allowed? For example , I want to make sure that the string vector contains only letters.
Is it possible? Thank you!