Skip to content

inspect() returns incorrect taxon/row #101

@marknovak

Description

@marknovak

I'm encountering a problem using inspect() in that, whether or not I provide taxon_name or row_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 using tnrs_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 a for loop, combining the chunks with rbind(). (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. its taxon_name and row_number), rather than using the "visible" taxon names and row names/numbers seen when one prints object.

For example, inspect(objects,row_number=1) does not actually return the first row of object. Renaming the row labels of object 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 using context). I presume I'll need to hardcode their corrections(?).]

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions