Closed pwinner1 closed 7 years ago
I think I've fixed this but haven't had a chance to test.
See if it works now, and if so, you can close the issue.
@ahhurlbert After I used this function now, it looks like it treats all of the prey names as problem names (even though they aren't), and in the "cleandb" file, all of the "Prey_Name_ITIS_ID" are "unverified".
Try it now. The function now checks for the nrow(hierarchy) instead of nrow(hierarchy[[1]]) which was causing the problem I think.
@ahhurlbert Did you push the changes you made to the function? I am still getting all the names as unmatched in the bad names file.
Oops. Try now.
looks good now
When the clean_all_names() function is used on the Barros_2014 paper, an error appears...
[1] "Scientific_Name 1 out of 12"
Retrieving data for taxon 'Anacardium occidentale'
[1] "Scientific_Name 2 out of 12"
Retrieving data for taxon 'Mangifera indica'
[1] "Scientific_Name 3 out of 12"
Retrieving data for taxon 'Erioteca gracilipes'
Error in if (class(hierarchy)[1] == "logical" | nrow(hierarchy) <= 1) { : argument is of length zero
Looks like this occurs when the name is not in ITIS.