-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inspect() returns incorrect taxon/row #101
Comments
Thanks for the report Mark. Are you using the CRAN version of the package or the GitHub version? I vaguely remember fixing something about this part of the code relatively recently and I don't know if it has made it to the CRAN release yet. If I still have power tomorrow (I'm in the middle of Irma), I'll investigate further. |
Thanks. I'm using the CRAN version. |
Could you please try the GitHub version to see if you still get the bug. I checked the commit logs, and I did update part of this code since the last CRAN release. The easiest way to install source("https://install-github.me/ropensci/rotl") |
I actually just logged in to let you know: I installed from GitHub (using Devtools) this morning but unfortunately the problem persists. Just for kicks, I also reinstalled with In case it helps, here's an example:
|
work in progress available for testing: |
Thanks Francois,
|
sorry about that, I had forgotten to add this function to the package. Please reinstall, it should work now. |
It's working(!), even after subsetting (e.g., to isolate taxa with multiple matches). It just doesn't work after resorting rows. Thank you for the quick turnaround, Francois. Much appreciated. |
I'm encountering a problem using
inspect()
in that, whether or not I providetaxon_name
orrow_number
,inspect(object,...)
is returning the incorrect taxon/row.Based on the description of
inspect()
, ("To inspect alternative taxonomic meanings of a given name, you need to provide the object resulting from a call to the tnrs_match_names function..."), I suspect my problem stems from the manner in which I am usingtnrs_match_names()
to create my object:I am trying to create a tree for some 400 taxa. However,
tnrs_match_names()
apparently doesn't support calls for more than 250 taxa at a time. Furthermore, I am using fuzzy matching (which takes a while for long lists and is thus prone to interruption). I am therefore running my matching search in chunks of 50 taxa at a time. I'm doing so with afor
loop, combining the chunks withrbind()
. (Fyi: My list of taxa is continually expanding, so I'm trying to avoid hardcoded fixes.)My suspicion is thus that
inspect()
is using some kind of internal bookkeeping to keep track of the location of each taxon (i.e. itstaxon_name
androw_number
), rather than using the "visible" taxon names and row names/numbers seen when one printsobject
.For example,
inspect(objects,row_number=1)
does not actually return the first row ofobject
. Renaming the row labels ofobject
doesn't change anything either.I'm happy to provide a reproducible example if needed, but figure someone might already know of an easy fix.
[My need to use
inspect()
here stems from the fact that many of my 400 taxa have multiple matches (that are incorrect, despite usingcontext
). I presume I'll need to hardcode their corrections(?).]thanks
The text was updated successfully, but these errors were encountered: