knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

ETERnity

The goal of ete is to provide an interface to the Evolution of Terrestrial Ecosystems (ETE) Program database.

Installation

You can install the released version of ete from GitHub with:

devtools::install_github("smithsonian/ETERnity")

Examples

Loading ETE Data

The first step to using ETERnity is to load the library, and then use the load_ete_data function to download the latest verion of ETE data from Figshare, and load it into 6 tables.

library(ETERnity)

data_tables <- load_ete_data(download_if_missing = TRUE)
#> Downloading version 1 of the data...
#> trying URL 'https://ndownloader.figshare.com/articles/[...]'
#> Content type 'application/zip' length 53537971 bytes (51.1 MB)
#> ==================================================
#> downloaded 51.1 MB
#> Unzipping file to /Users/[username]/.ete...

names(data_tables)

User Functions

We have created a suite of user functions that allow you to pull data out of the ETE tables by provider. You can pull out yours or anyone else's.

geteteoccur(provider): Get your occurrence table in long format.

amatangelo_occur <- geteteoccur(data_tables, 'Amatangelo')
head(amatangelo_occur)

geteteoccurDataset(dataset): Get your occurrence table in long format for one timebin

amatan_wi_occur <- geteteoccurDataset(data_tables, 'Amatan_WI_Pla_Hist')
head(amatan_wi_occur)

unmelt2specXsite(table): Put your occurrence table in P/A matrix format

PAtable <- unmelt2specXsite(amatan_wi_occur)
PAtable[1:5,1:5]

getlatlon(provider): Get a list of your sites and their coordinates

wing_sites <- getlatlon(data_tables, 'Wing')
head(wing_sites)

getages(provider): Get a list of your sites and their ages

ages <- getages(data_tables, "Behrensmeyer1")
head(ages)

getsitetraits(provider): Get your site traits matrix

sitetraits <- getsitetraits(data_tables, "Blois")
head(sitetraits)

getspptraits(provider): Get your species trait matrix

spptraits <- getspptraits(data_tables,"Lyons")
head(spptraits)

Citation

If you use the ETERnity package, please cite accordingly:

Attribution

The dataset download and load functions all borrowed heavily from portalr.



Smithsonian/ETERnity documentation built on March 1, 2020, 5:45 a.m.