Open scienceisfiction opened 8 years ago
Hey @scienceisfiction,
What if you did something like this?
genera <- c("genus1", "genus2", "genus3")
DougsData %>%
assert(in_set(genera), genus)
Would that work for you?
Thanks @JoeyBernhardt ! Worked perfectly--of course it was something we went over in class that I just missed, lol.
This is probably a dumb question, but does someone know of a simple way to use logicals on characters? The way my data is currently tidied, most of my assertions are about characters, not numbers, for example:
Is there a simple way to solve the problem of the last line? It would be more informative then just asking R to verify the number of genus (2) if I could make sure all values are exactly 'selasphorus' OR 'unknown'...