Repository navigation
Replies: 1 comment 1 reply
|
Hi, I can surely see the point in that, but also think it is too specific. We could add tens or hundreds of functions so support all kinds of filters on specific taxonomic properties. I think we shouldn’t. You can however make your code much easier and faster: df <- df %>%
mutate(enterobact = mo_order(org_code) == "Enterobacterales")Or directly in an if (mo_order(df$org_code) == "Enterobacterales") {
…
}
if (mo_order(df$org_code) == "Enterobacterales") {
…
} else {
…
} |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Could it be possible to have a function which creates a binary variable (could be a logical) that scrapes the organism code variable and says "yes" or "no" if the organism is an Enterobacterales?
Here's my coding I've used so far but if it could be nicely wrapped up into a mo_enterobacterales() or something similar?
All reactions