formatdata: formatdata

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Changes and adds columns to your fossil occurrences data.frame from the Paleobiology Database to the names needed for the functions in this package. It also calculates the average age of the fossil occurrences from the data.frame columns early_age and late_age.

Usage

1
formatdata(data, db = "pbdb")

Arguments

data

data.frame. Fossil occurrences data from the Paleoiology Database.

db

character. Name of the database where the data is from. Only db = "pbdb" possible.

Value

data.frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

library(mapast)

data  <-  base::data.frame(paleobioDB::pbdb_occurrences(limit = 100, base_name = "Canis", 
  min_ma = 0, max_ma = 10, 
  show = c("coords", "phylo"), 
  vocab = "pbdb"))
  
fdata <- formatdata(data, db = "pbdb")


## End(Not run)

macroecology/pasta documentation built on March 1, 2020, 11:22 p.m.