Learn R Programming

neotoma2 R Package

The neotoma2 R package represents a set of breaking changes with the original neotoma R package. The neotoma package was deprecated following end-of-life for the Neotoma Windows Server in 2020 and the migration of the Neotoma backend infrastructure to a PostgreSQL database and JavaScript API.

The neotoma2 package is built on the new Neotoma API and is intended as a starting point for a fully interactive experience with the Neotoma Paleoecology Database, to support both data access and data input through R.

Contributors

This project is an open project, and contributions are welcome from any individual. All contributors to this project are bound by a code of conduct. Please review and follow this code of conduct as part of your contribution.

Tips for Contributing

Issues and bug reports are always welcome. Code clean-up, and feature additions can be done either through pull requests to project forks or project branches.

Please direct development questions to Simon Goring by email: goring@wisc.edu.

All products of the Neotoma Paleoecology Database are licensed under an MIT License unless otherwise noted.

How to use this repository

All R functions for the package should be written in the R folder. Any documentation should be added to .R files using roxygen2 notation. Because we are using roxygen2 for documentation in this package, all edits to documentation should take place in the associated functions .R file. The files in the man folder should not be manually changed.

Class definitions and new methods should be added to the files 01_classDefinitions.R and 02_genericDefinitions.R respectively, to ensure they are properly loaded during the package build process.

Development Workflow Overview

The neotoma2 package is built for R. Build tools include elements from the usethis, devtools and testthat R packages, and build and compilation occurs within (and outside) the RStudio IDE environment.

Package use requires the use of the devtools::install_github() function, to pull this working repository into a user's environment:

devtools::install_github('NeotomaDB/neotoma2', build_vignettes = TRUE)

The expectation for this repository is that all commits to the prod branch will support a clean package build. This is supported through GitHub Actions in the .github folder of the repository.

Analysis Workflow Overview

There is considerable information in the vignettes for the package, which can be accessed directly.

Report of Sites Statistics

In order to see the total available sites that can be queried by this package, use the function:

neotoma2::get_stats(start=0, end=1)

System Requirements

This project is built with R > v4.0. The packages needed for proper package use are detailed in the DESCRIPTION file for this repository.

Data Requirements

The neotoma2 R package pulls data from the Neotoma Paleoecology Database. Neotoma maintains a permissive data use policy. Within the data use policy there is a statement on co-authorship which reads:

Normal ethics apply to co-authorship of scientific publications. Paleoecological datasets are labor-intensive and complex: they take years to generate and always have additional attributes and metadata not captured in Neotoma. Neotoma data quality also relies on expert curation by data stewards, each associated with one or more Constituent Databases. Users of data stored in Neotoma’s Constituent Databases should consider inviting the original data contributor, or Constituent Database steward(s), to be a co-author(s) of any resultant publications if that contributor’s data are a major portion of the dataset analyzed, or if a data contributor or steward makes a significant contribution to the analysis of the data or to the interpretation of results. For large-scale studies using many Neotoma records, contacting all contributors or stewards or making them co-authors will not be practical, possible, or reasonable. Under no circumstance should authorship be attributed to data contributors or stewards, individually or collectively, without their explicit consent.

Metrics

This project is to be evaluated using the following metrics:

  • Maintenance Github 1.0.6 release DONE June 23, 2025
  • Maintenance Github 1.0.5 release, DONE December 27, 2024
  • Maintenance Github 1.0.4 release, DONE July 23, 2024
  • Updated production Branch with CRAN changes, May 24, 2024.
  • Maintenance Github 1.0.3 release, DONE February 28, 2024
  • Published JOSS paper, DONE 28 November, 2023
  • Submitted paper to JOSS DONE 03 May, 2023
  • Completion CRAN 1.0.0 release DONE April 23, 2023
  • Completion of core functionality for data access DONE Feb 10, 2022
  • Completion of core functionality for data presentation DONE
  • Completion of clear vignettes for major data types or Constituent Databases represented within the Neotoma Database.

Copy Link

Version

Install

install.packages('neotoma2')

Monthly Downloads

290

Version

1.0.6

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Dominguez Vidana Socorro

Last Published

June 25th, 2025

Functions in neotoma2 (1.0.6)

as.data.frame,publication-method

Convert a publication to a data.frame
author-class

An S4 class for the authors of a Neotoma publication.
c,sites-method

c Method - Combine sites objects
$,publication-method

Extract an element from a publication
$,sample-method

$
c,publications-method

Combine publication objects.
authors-class

An S4 class for a set of Neotoma author objects.
$<-,chronology-method

Replace part of an object
c,specimens-method

c Method - Combine specimens objects
$,samples-method

$ for samples
c,taxa-method

c Method - Combine taxa objects
build_sample

Build a samples data.frame from Neotoma API JSON
$,collunit-method

$
build_dataset

Build a dataset object from a JSON list representation.
$,chronology-method

Extract
$,chronologies-method

Extract
$,datasets-method

$ for datasets
c,contacts-method

c Method - Combine contacts objects
$,dataset-method

$
$,site-method

$
$<-,taxon-method

Assign taxon field by numeric index
$,collunits-method

$ for collunits
$<-,site-method

Assign site field by numeric index
$,sites-method

$ for sites
chroncontrols,sites-method

Recover information about the chron controls for a collectionunit.
chroncontrols,site-method

Recover information about the chron controls for a collectionunit.
$<-,specimen-method

Assign specimen field by numeric index
chronologies,sites-method

Extract chronologies from a sites object.
chronologies,site-method

Extract chronologies from a site object.
contact-class

An S4 class for Neotoma contacts
contacts-class

An S4 class for multi-contact information from the Neotoma Paleoecology Database.
as.data.frame,publications-method

Convert publications to a data.frame
c,chronologies-method

c Method - Combine chronologies objects
as.data.frame,site-method

as.data.frame site
c,collunits-method

c Method - Combine collunits objects
check_contacts.contacts

Get contact information for Neotoma contributors
cite_data,sites-method

Obtain data citations from multiple records.
collunits,sites-method

Extract collunits from a sites object.
collunits

Extract collection units from a sites object
check_contacts

Check contact information for a record against Neotoma contributors
cite_data,site-method

Obtain data citations from a single record.
$,specimens-method

$ for specimens
$,taxa-method

$ for taxa
doi,site-method

Obtain dataset DOIs from records.
doi,sites-method

Obtain dataset DOIs from records.
$,specimen-method

$
$<-,collunit-method

Assign collunit field by numeric index
$<-,dataset-method

Assign dataset field by numeric index
dataset-class

S4 class for dataset information
datasets,sites-method

Extract datasets from a sites object.
datasets-class

S4 class for datasets information
chronologies

Obtain the chronology from a record or multiple records.
datasets,site-method

Extract datasets from a site object.
chronology-class

S4 class for chronologies information
get_datasets.site

Get Dataset from a site object.
get_datasets.numeric

Get Dataset Numeric
get_table

Get table record from Neotoma
build_collunits

Build a collection unit from the API response
build_chron

build_chron
as.data.frame,taxa-method

as.data.frame taxa
chronologies,collunit-method

Extract chronologies from a collunit object.
chronologies,collunits-method

Extract chronologies from a collunits object.
get_datasets

get_datasets
chronologies-class

S4 class for chronologies information
cite_data

Generate a data citation from a Neotoma2 object.
chroncontrols

chroncontrols
length,chronologies-method

Length Method chronologies
getids.sites

Get object IDs from sites
get_sites.numeric

Get Site Information for Fossil Sites
get_taxa

get_taxa
get_taxon.default

Get Taxa Default
get_specimens.numeric

Get Specimen Numeric
get_sites.default

get_sites
get_specimens.default

Get Specimen datasetid
get_datasets.default

Get Dataset Default
get_publications

Get publication information for Neotoma records
length,publications-method

Get the number of publications in a publications object.
get_taxon.numeric

Get Taxa Numeric
get_stats

get_stats
get_specimens.sites

Get Specimen Sites
get_publications.default

Get publication information from Neotoma
getids.collunits

Get object IDs from collectionunits.
collunits-class

An S4 class for Neotoma Collection Units
doi

Obtain the DOI for publications or datasets.
collunits,site-method

Extract collunits from a site object.
filter

Apply a filter for Neotoma sites objects.
collunit-class

S4 class for collection units information.
coordinates,sites-method

Return the latitude and longitude of sites
coordinates

Obtain coordinates from a sites object.
repositories-class

S4 class for repositories information
get_downloads.character

get_downloads JSON
repository-class

S4 class for repository information
names,collunit-method

Get slot names
names,contact-method

Get names of contacts slots
get_downloads.numeric

get_downloads
get_downloads.sites

get_downloads sites
samples

Obtain samples from a record or multiple records.
get_manual

get_manual
length,samples-method

Length Method samples
pingNeotoma

pingNeotoma
set_site

set Site Information for Fossil Sites
set_server

Set Neotoma API Source or Server
selectMatch,publication,logical-method

Select the best match (between a local record and a Neotoma match)
c,missingOrNULL-method

c Method for NULL values
$,contact-method

Extract or Replace Parts of an Object
$,contacts-method

Extract or Replace Parts of an Object
c,datasets-method

c Method - Combine datasets objects
show,contact-method

Show contact object
length,datasets-method

Length Method datasets
length,collunits-method

Length Method collunits
newURL

Format API call to Neotoma from call arguments
parseURL

parseURL
plotLeaflet,sites-method

plotLeaflet
getids.site

Get object IDs from a site object.
datasets

Extract datasets from a sites object.
length,sites-method

Length Method Sites
show,contacts-method

Show a contacts object.
get_downloads

get_downloads
get_publications.publications

Update metadata for a set of publication objects.
get_datasets.sites

Get Dataset from a sites object.
doi,publication-method

Get a publication DOI.
get_sites

get_sites
set_chronology

set chronology information for a new record.
plotLeaflet

plotLeaflet
get_sites.sites

Get Site Information for Fossil Sites from a Set of Sites
get_specimens

get_specimens
set_collunit

set Site Information for Fossil Sites
show,collunit-method

Show the collection unit information
show,collunits-method

Show the collection unit information
getids

Get object IDs
show,site-method

Show a site object as a dataframe
getids.collunit

Get object IDs from a single collectionunit.
names,dataset-method

Get slot names
%>%

Pipe operator
publications-class

An S4 class for multi-publication information from the Neotoma Paleoecology Database. This S4 class allows a single dataset to have one or more publication classes associated with it.
publication-class

An S4 class for a single Neotoma publication.
samples,site-method

samples
set_dataset

set Site Information for Fossil Sites
names,publication-method

Get slot names for a publication object.
samples,sites-method

samples
site-class

An S4 class for site information
sites-class

An S4 class for multi-site information
set_contact

Set contact information for a new record.
specimens-class

S4 class for specimens information
specimen-class

S4 class for specimen information
show,datasets-method

Show Datasets object as a dataframe
show,dataset-method

Show Dataset Method
[,specimens,numeric-method

Get or remove specimens by numeric index
[[,collunits,numeric-method

Slicer
[[,chronologies,numeric-method

Extract
show,sites-method

Show sites objects as a dataframe
$,taxon-method

$
names,publications-method

Get slot names for a publication object.
datasets,collunit-method

Extract datasets from a collunit object.
check_args

check_args
plotLeaflet,site-method

plotLeaflet
plot,sites-method

Plot site coordinates using a basic plot.
names,site-method

Get slot names
show,publication-method

Print publications to screen.
[[<-,specimens,ANY,ANY,ANY-method

Insert specimen
[<-,taxon,character,ANY,ANY-method

Assign taxon field by numeric index
[[,taxa,numeric-method

Slicer
[<-,specimen,numeric,ANY,ANY-method

Assign specimen field by numeric index
[[<-,taxa,ANY,ANY,ANY-method

Insert taxon
[[,specimens,numeric-method

Slicer
[[,contacts,numeric-method

Extract or Replace Parts of an Object
showMatch,publication-method

Show matched publication objects.
names,taxon-method

Get slot names
names,specimen-method

Get slot names
length,specimens-method

Length Method specimens
samples,collunits-method

Get samples from a collectionunit or set of collection units:
samples,collunit-method

samples
write.csv,sites-method

write CSV
write.csv,datasets-method

write CSV
filter.sites

Apply a filter for Neotoma sites objects.
get_contacts

Get contact information for Neotoma contributors
datasets,collunits-method

Extract datasets from a collunits object.
get_contacts.numeric

Get contact information for Neotoma contributors
get_contacts.default

Get contact information for Neotoma contributors
showMatch

Show matches for objects.
get_publications.numeric

Get publications using their unique identifier.
specimens

Obtain specimens from a record or multiple records.
[<-,specimen,character,ANY,ANY-method

Assign specimen field by numeric index
[<-,dataset,character,ANY,ANY-method

Assign dataset field by numeric index
[<-,collunit,numeric,ANY,ANY-method

Assign collunit field by numeric index
show,publications-method

Show the contents of a publication object.
[<-,site,numeric,ANY,ANY-method

Assign site field by numeric index
taxa,sites-method

Extract taxonomic data from a set of sites.
taxa

taxa
get_publications.publication

Update information for a publications object.
show,specimen-method

Show Specimen Method
set_sample

set Sample Information
set_publications

Create a new publication (or publication set)
[,collunits,numeric-method

Get or remove sites by numeric index
show,taxa-method

Show Taxa Method
show,specimens-method

Show Specimens object as a dataframe
show,taxon-method

Show Taxon Method
[,sites,numeric-method

Get or remove sites by numeric index
[,site,numeric-method

Get site field by numeric index
[[,samples,numeric-method

Slicer
[[,sites,numeric-method

Slicer
get_taxa.default

Get Taxa Default
specimens,collunit-method

specimens
specimens,collunits-method

specimens
[,datasets,numeric-method

Get or remove datasets by numeric index
[[<-,datasets,ANY,ANY,ANY-method

Insert dataset
[[<-,collunits,ANY,ANY,ANY-method

Insert collunit
get_taxon

get_taxon
length,taxa-method

Length Method taxa
parse_site

parse_site
parsebody

parse_body
missingOrNULL-class

c Method - Combine objects, including NULL
[,taxa,numeric-method

Get or remove taxa by numeric index
[,site,character-method

Get site field by character index
[[<-,publications,ANY,ANY,ANY-method

Assign value to an element in a publication list.
taxa,collunit-method

Extract taxonomic data from a set of sites.
[[<-,sites,ANY,ANY,ANY-method

Insert site
write.csv,chronologies-method

write CSV
write.csv,collunits-method

write CSV
taxa-class

S4 class for taxa information
sample-class

S4 class for dataset information
selectMatch,publication,numeric-method

Select the best match (between a local record and a Neotoma match)
samples-class

S4 class for the set of samples
taxa,site-method

Extract taxonomic data from a single site.
taxa,collunits-method

Extract taxonomic data from a set of sites.
[<-,collunit,character,ANY,ANY-method

Assign collunit field by numeric index
set_default,chronologies-method

Change the default age model for a record.
selectMatch

Select the best match for an object.
toJSON,sites-method

toJSON
taxon-class

S4 class for specimen information
write.csv,specimens-method

write CSV
set_default

Set the default chronology within a collectionunit.
write.csv,taxa-method

write CSV
specimens,sites-method

specimens
[[,publications,numeric-method

Obtain one of the elements within a publication list.
specimens,site-method

specimens
[[,datasets,numeric-method

Slicer
[<-,dataset,numeric,ANY,ANY-method

Assign dataset field by numeric index
[<-,site,character,ANY,ANY-method

Assign site field by numeric index
[<-,taxon,numeric,ANY,ANY-method

Assign taxon field by numeric index
summary,sites-method

Summary of objects within a sites object.
toJSON

toJSON
toWide

toWide
as.data.frame,collunits-method

as.data.frame collunits
as.data.frame,collunit-method

as.data.frame site
add_chronology

Add a new chronology to a collection unit.
as.data.frame,chronology-method

Create a data.frame from a chronology object.
as.data.frame,contacts-method

Transform a contacts object to a data.frame()
add_chronology,collunit,chronology,data.frame-method

Add a new chronology into an existing collectionunit.
as.data.frame,chronologies-method

as.data.frame chronologies
as.data.frame,contact-method

Transform a contacts object to a data.frame()
as.data.frame,authors-method

Convert a publication author to a data.frame
as.data.frame,dataset-method

as.data.frame dataset
as.data.frame,sites-method

as.data.frame sites
as.data.frame,specimen-method

as.data.frame specimen
as.data.frame,specimens-method

as.data.frame specimens
c,contact-method

c Method - Combine contacts objects
build_specimen

Build a specimen objects.
as.list,sites-method

as.list sites
build_sites

Build a site from the Neotoma API response.
as.data.frame,taxon-method

as.data.frame taxon
as.data.frame,datasets-method

as.data.frame datasets