taxonlookup
taxonlookup copied to clipboard
duplicate 'row.names' are not allowed. when by_species = TRUE
I have a large list of genera to lookup, and I (knowingly) have lots of duplicates. I don't want it all uniq'd down to unique genera only.
If the list starts with "Aa" first and "Aa" second, I want two separate lines output e.g.
genus family order group
1 Aa Orchidaceae Asparagales Angiosperms
2 Aa Orchidaceae Asparagales Angiosperms
But instead it just throws an error and doesn't output any table. I can only get an output table with by_species=FALSE and it only has ~12,000 in it (not what I want).
str(A)
chr [1:337444] "Aa" "Aa" "Aaronsohnia" "Narthecium" "Abarema" ...
lookup_table(A,missing_action="NA",by_species=TRUE)
Error in `row.names<-.data.frame`(`*tmp*`, value = value) :
duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique values when setting 'row.names': ‘Aa’, ‘Abarema’, ‘Abelia’, ‘Abeliophyllum’, ‘Abelmoschus’, ‘Abies’, ‘Abrodictyum’, ‘Abroma’, ‘Abronia’, ‘Abrophyllum’, ‘Abrotanella’, ‘Abrus’, ‘Abuta’, ‘Abutilon’, ‘Acacia’, ‘Acaciella’, ‘Acaena’, ‘Acalypha’, ‘Acampe’, ‘Acamptopappus’, ‘Acanthephippium’, ‘Acanthocalycium’, ‘Acanthocalyx’, ‘Acanthocarpus’, ‘Acanthocereus’, ‘Acantholimon’, ‘Acantholippia’, ‘Acantholobivia’, ‘Acanthomintha’, ‘Acanthopale’, ‘Acanthopanax’, ‘Acanthophoenix’, ‘Acanthophyllum’, ‘Acanthoprasium’, ‘Acanthopsis’, ‘Acanthorhipsalis’, ‘Acanthorrhiza’, ‘Acanthoscyphus’, ‘Acanthosicyos’, ‘Acanthospermum’, ‘Acanthostachys’, ‘Acanthosyris’, ‘Acanthus’, ‘Acaulimalva’, ‘Acca’, ‘Acer’, ‘Aceratium’, ‘Achatocarpus’, ‘Achetaria’, ‘Achillea’, ‘Achimenes’, ‘Achlys’, ‘Achnather [... truncated]
Is it possible to coerce it to the style of output I desire, outputting 'dumbly' for each and every input name, even if there are duplicates?