Description Usage Arguments Details Value Examples
takes character vector with taxon names and retrives AphiaRecords from WoRMS
1 2 3 | wormsbynames(taxon_names, ids = FALSE, match = FALSE, verbose = TRUE,
chunksize = 50, like = "false", marine_only = "true",
sleep_btw_chunks_in_sec = 0.1)
|
taxon_names |
character vector with names of taxa to look up. |
ids |
add column "id" and "name" with running id and search names |
match |
taxon_names that could not retrieved will be retried with |
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 |
Add a "%"-sign after the ScientificName (SQL LIKE function). Default=true |
marine_only |
Limit to marine taxa. Default=true |
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.