Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

wormsaccepted

Constructs "accepted_id" column which contains the "AphiaID" of the respective "accepted" taxon


Description

takes data.frame as output by wormsbynames , wormsbymatchnames, or wormsbyid and add field "accepted_id" wich contains the "AphiaID" of the respective "accepted" taxon

Usage

wormsaccepted(x, verbose = TRUE, n_iter = 10)

Arguments

x

data.frame

verbose

be verbose

n_iter

maximum search depth. Usually 3 is sufficient. Safety feature for breaking the while loop

Details

This function helps updating you taxon information and eliminates ambiguity because the valid AphiaID is nor neccessary the AphiaID of an accepted taxon. You should run wormsconsolidate bevorhand to enshure all "accepted" taxons are present.

Value

a data frame.

Examples

## start with IDs that are no longer up to date 
# get the Aphia information
u<-wormsbyid(c(424548,340537))

#recursively retrive information on the taxa they refer to
v<-wormsconsolidate(u)

# what are the currently correct "accepted" taxa? Answer: "accepted_id".
w<-wormsaccepted(v)
w[,c("scientificname","AphiaID","status","valid_AphiaID","valid_name","accepted_id")]

worms

Retriving Aphia Information from World Register of Marine Species

v0.2.2
GNU Affero General Public License
Authors
Jan Holstein [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.