You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's easier for me to comment into the code if you create a pull request.
This is a simple function, so the tests are simple: reject everything that is not mode()/typeof()/and class() character and that has length() < 1 - then test that a few keys that are present in the table return TRUE, and some that are not present return FALSE.
Should NA in the input return NA or FALSE? By analogy to is.finite(c(1:3, NA, 4L)) I vote it should return FALSE, not NA.
A character string that is not in the table is not "invalid", but input values like TRUE, or 3.142, or a data frame would be invalid. That done, I can't imagine "corrupt" input, so unless you can think of some, we can skip that. "Corrupt" would mean that it could violate some of the internal assumptions of the function. But there really are none.
Testing the script that parses the HGNC table is another matter, but we can't really do that because we are not running the script through testthat(). So we'll just have to read it carefully.
The text was updated successfully, but these errors were encountered: