Description Usage Arguments Details Value Examples
takes character vector with taxon names and retrives AphiaRecords from WoRMS
1 2 3 |
taxon_names |
character vector with names of taxa to look up. |
ids |
add column "id" and "name" with running id and search names |
verbose |
be verbose |
chunksize |
there is a limit to the number of taxa that can be looked up at once, so request are split up into chunks. This limit seems to be variable. 50 is very safe. |
like |
Returns also entries of match_type 'like'. Default=TRUE |
marine_only |
Limit to marine taxa. Default=TRUE |
match |
TRUE for fuzzy name matching (AphiaRecordsByMatchNames). FALSE for default matching (AphiaRecordsByNames). Default=FALSE |
sleep_btw_chunks_in_sec |
pause between requests |
This function will take a character vector with taxon names, retrive AphiaRecords (CC-BY) from www.marinespecies.org using the GET /AphiaRecordsByName/ScientificName Method described at http://www.marinespecies.org/rest/. Results will be output to a data.frame with each row being a record. For each name given, only the one AphiaRecord will be retrived. AphiaRecord with "accepted" status are preferred. If not present last entry will be taken which seems to result in best results.
a data frame.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | taxon_names <- c( "Westwodilla caecula" , "Abra alba", "Chaetozone cf. setosa", "Algae" )
w <- wormsbynames(taxon_names)
## print unrecognized returns
failed_species <- rownames(w[is.na(w[,1]),])
## try again with fuzzy matching turned on
w <- wormsbynames(taxon_names, match=TRUE)
## this is how to load taxon_names from file
write.csv(taxon_names , file = "tax.csv",
row.names = FALSE,
na = "")
## check it out, then load it
read.csv(file = "tax.csv",
na = "",
stringsAsFactors = FALSE,
col.names = FALSE)
## save results to file to inspect with, e.g. spreadsheet software
write.csv(w,file = "aphiainfo.csv",
na = "",
col.names = TRUE,
row.names = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.