Im trying to find common names from a list of scientific names (not all will have them though).I was attempting to use taxize in R but it aborts if it doesnt find an entry in EOL and I dont know a way around this other than manually editing the list - in which case I might as well check all this way.Does anyone have a better way of doing this?
How to convert species names into common names?
r;database;taxonomy
As Pierre mentioned, NCBI is a good resource for this kind of transformation.You can still use taxize to perform the conversion:library(taxize)species <- c('Helianthus annuus', 'Mycobacterium bovis', 'Rattus rattus', 'XX', 'Mus musculus')uids <- get_uid(species)# keep only uids which you have in the databaseuids.found <- as.uid(uids[!is.na(uids)])# keep only species names  corresponding to your idsspecies.found <- species[!is.na(uids)]common.names <- sci2comm(uids.found, db = 'ncbi')names(common.names) <- species.foundcommon.names## output:## $`Helianthus annuus`## [1] common sunflower## ## $`Mycobacterium bovis`## character(0)## ## $`Rattus rattus`## [1] black rat## ## $`Mus musculus`## [1] house mouseThis works correctly if no common name is available, or if there is no species in the database. You can also try a different database, e.g. db='itis'.The advantage of this approach is that you do not have to parse a file yourself. The downside is that it can be slow for large list, since for every species a database request is performed.