Open vertesy opened 10 months ago
You seem to misunderstand what the manual says: the possible values for the names
argument of checkCharacter
are listed in ?checkNamed
(see the type
argument). So you can have sthing like:
checkCharacter(c(a = "A", b = "B"), names = "unique") # this passes
#checkCharacter(c(a = "A", b = "B"), names = "unnamed") # this fails
If you want to check for a specific set of names, you have to use checkSubset
:
x <- c(a = "A", b = "B")
assert(
checkCharacter(x),
checkSubset(names(x), choices = base::letters),
combine = "and"
)
Ah, thanks, especially for typing out the examples!! clear now!
Hey,
first off, thanks for the great package!
In
checkCharacter()
, argnames =
you write:checkSubset()
insidecheckCharacter()
? How?Thank you for your time taken!