# NOT RUN {
# getting occurrence data for a genus, sorting it
# Dicellograptus
dicelloData <- getPBDBocc("Dicellograptus")
dicelloOcc2 <- taxonSortPBDBocc(
data = dicelloData,
rank = "species",
onlyFormal = FALSE
)
names(dicelloOcc2)
# try a PBDB API download with lots of synonymization
#this should have only 1 species
# *old* way, using v1.1 of PBDB API:
# acoData <- read.csv(paste0(
# "http://paleobiodb.org/data1.1/occs/list.txt?",
# "base_name = Acosarina%20minuta&show=ident,phylo"))
#
# *new* method - with getPBDBocc, using v1.2 of PBDB API:
acoData <- getPBDBocc("Acosarina minuta")
acoOcc <- taxonSortPBDBocc(
data = acoData,
rank = "species",
onlyFormal = FALSE
)
names(acoOcc)
# }
# NOT RUN {
#load example graptolite PBDB occ dataset
data(graptPBDB)
#get formal genera
occGenus <- taxonSortPBDBocc(
data = graptOccPBDB,
rank = "genus"
)
length(occGenus)
#get formal species
occSpeciesFormal <- taxonSortPBDBocc(
data = graptOccPBDB,
rank = "species")
length(occSpeciesFormal)
#yes, there are fewer 'formal'
# graptolite species in the PBDB then genera
#get formal and informal species
occSpeciesInformal <- taxonSortPBDBocc(
data = graptOccPBDB,
rank = "species",
onlyFormal = FALSE
)
length(occSpeciesInformal)
#way more graptolite species are 'informal' in the PBDB
#get formal and informal species
#including from occurrences with uncertain taxonomy
#basically everything and the kitchen sink
occSpeciesEverything <- taxonSortPBDBocc(
data = graptOccPBDB,
rank = "species",
onlyFormal = FALSE,
cleanUncertain = FALSE)
length(occSpeciesEverything)
# }
Run the code above in your browser using DataLab