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

136

Version

1.0.7

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Dominguez Vidana Socorro

Last Published

July 15th, 2025

Functions in neotoma2 (1.0.7)

add_chronology,collunit,chronology,data.frame-method

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

Create a data.frame from a chronology object.
author-class

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

c Method for NULL values
authors-class

An S4 class for a set of Neotoma author objects.
c,publications-method

Combine publication objects.
$,datasets-method

$ for datasets
as.data.frame,collunit-method

as.data.frame site
$,publication-method

Extract an element from a publication
as.data.frame,datasets-method

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

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

as.data.frame taxa
cite_data,sites-method

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

c Method - Combine collunits objects
c,contact-method

c Method - Combine contacts objects
cite_data

Generate a data citation from a Neotoma2 object.
coordinates

Obtain coordinates from a sites object.
dataset-class

S4 class for dataset information
as.data.frame,contacts-method

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

as.list sites
as.data.frame,taxon-method

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

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

as.data.frame collunits
$,contacts-method

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

$
$<-,dataset-method

Assign dataset field by numeric index
$,collunits-method

$ for collunits
$<-,site-method

Assign site field by numeric index
as.data.frame,publications-method

Convert publications to a data.frame
as.data.frame,dataset-method

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

Convert a publication to a data.frame
as.data.frame,site-method

as.data.frame site
doi,publication-method

Get a publication DOI.
doi,site-method

Obtain dataset DOIs from records.
c,sites-method

c Method - Combine sites objects
c,samples-method

c Method - Combine datasets objects
c,taxa-method

c Method - Combine taxa objects
$,chronologies-method

Extract
get_datasets.site

Get Dataset from a site object.
build_specimen

Build a specimen objects.
check_contacts

Check contact information for a record against Neotoma contributors
get_datasets.sites

Get Dataset from a sites object.
c,chronologies-method

c Method - Combine chronologies objects
$,taxon-method

$
$,sites-method

$ for sites
c,contacts-method

c Method - Combine contacts objects
$,taxa-method

$ for taxa
c,datasets-method

c Method - Combine datasets objects
$,contact-method

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

$
$,chronology-method

Extract
$,samples-method

$ for samples
chronology-class

S4 class for chronologies information
get_stats

get_stats
length,collunits-method

Length Method collunits
length,chronologies-method

Length Method chronologies
get_table

Get table record from Neotoma
plotLeaflet,site-method

plotLeaflet
$,collunit-method

$
$<-,taxon-method

Assign taxon field by numeric index
$,site-method

$
contacts-class

An S4 class for multi-contact information from the Neotoma Paleoecology Database.
cite_data,site-method

Obtain data citations from a single record.
coordinates,sites-method

Return the latitude and longitude of sites
$<-,collunit-method

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

Replace part of an object
samples,collunits-method

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

plotLeaflet
chronologies,collunits-method

Extract chronologies from a collunits object.
chronologies-class

S4 class for chronologies information
filter

Apply a filter for Neotoma sites objects.
filter.sites

Apply a filter for Neotoma sites objects.
check_contacts.contacts

Get contact information for Neotoma contributors
chronologies,sites-method

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

Extract chronologies from a collunit object.
chronologies

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

Extract chronologies from a site object.
get_downloads

get_downloads
chroncontrols,site-method

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

samples
get_downloads.numeric

get_downloads
collunits,site-method

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

Extract collunits from a sites object.
set_contact

Set contact information for a new record.
show,taxa-method

Show Taxa Method
set_collunit

set Site Information for Fossil Sites
show,sites-method

Show sites objects as a dataframe
datasets-class

S4 class for datasets information
datasets,collunit-method

Extract datasets from a collunit object.
[,site,numeric-method

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

Get or remove sites by numeric index
get_publications.numeric

Get publications using their unique identifier.
get_publications.publication

Update information for a publications object.
chroncontrols,sites-method

Recover information about the chron controls for a collectionunit.
collunit-class

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

Extract datasets from a sites object.
datasets

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

Obtain dataset DOIs from records.
doi

Obtain the DOI for publications or datasets.
chroncontrols

chroncontrols
get_downloads.sites

get_downloads sites
[[<-,collunits,ANY,ANY,ANY-method

Insert collunit
get_datasets.numeric

Get Dataset Numeric
get_datasets.default

Get Dataset Default
datasets,collunits-method

Extract datasets from a collunits object.
datasets,site-method

Extract datasets from a site object.
get_manual

get_manual
get_taxon.numeric

Get Taxa Numeric
collunits-class

An S4 class for Neotoma Collection Units
[[<-,datasets,ANY,ANY,ANY-method

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

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

Assign sample field by numeric index
summary,sites-method

Summary of objects within a sites object.
taxa-class

S4 class for taxa information
getids

Get object IDs
collunits

Extract collection units from a sites object
contact-class

An S4 class for Neotoma contacts
get_sites

get_sites
get_publications.publications

Update metadata for a set of publication objects.
length,publications-method

Get the number of publications in a publications object.
length,datasets-method

Length Method datasets
%>%

Pipe operator
getids.collunit

Get object IDs from a single collectionunit.
getids.collunits

Get object IDs from collectionunits.
get_publications

Get publication information for Neotoma records
get_publications.default

Get publication information from Neotoma
get_taxa.default

Get Taxa Default
get_taxa

get_taxa
length,taxa-method

Length Method taxa
get_sites.numeric

Get Site Information for Fossil Sites
get_sites.default

get_sites
missingOrNULL-class

c Method - Combine objects, including NULL
samples-class

S4 class for the set of samples
plot,sites-method

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

Get slot names for a publication object.
names,site-method

Get slot names
get_contacts

Get contact information for Neotoma contributors
get_contacts.default

Get contact information for Neotoma contributors
get_taxon.default

Get Taxa Default
get_taxon

get_taxon
set_dataset

set Site Information for Fossil Sites
set_default,chronologies-method

Change the default age model for a record.
set_site

set Site Information for Fossil Sites
samples,collunit-method

samples
show,collunit-method

Show the collection unit information
names,taxon-method

Get slot names
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.
get_contacts.numeric

Get contact information for Neotoma contributors
repositories-class

S4 class for repositories information
pingNeotoma

pingNeotoma
show,contact-method

Show contact object
show,taxon-method

Show Taxon Method
show,collunits-method

Show the collection unit information
show,publications-method

Show the contents of a publication object.
get_datasets

get_datasets
names,collunit-method

Get slot names
specimens-class

S4 class for specimens information
names,contact-method

Get names of contacts slots
names,dataset-method

Get slot names
showMatch,publication-method

Show matched publication objects.
names,publication-method

Get slot names for a publication object.
selectMatch,publication,numeric-method

Select the best match (between a local record and a Neotoma match)
showMatch

Show matches for objects.
set_server

Set Neotoma API Source or Server
publication-class

An S4 class for a single Neotoma publication.
plotLeaflet

plotLeaflet
selectMatch,publication,logical-method

Select the best match (between a local record and a Neotoma match)
set_sample

set Sample Information
[[,chronologies,numeric-method

Extract
site-class

An S4 class for site information
taxon-class

S4 class for specimen information
show,site-method

Show a site object as a dataframe
getids.site

Get object IDs from a site object.
length,samples-method

Length Method samples
getids.sites

Get object IDs from sites
repository-class

S4 class for repository information
length,sites-method

Length Method Sites
sample-class

S4 class for dataset information
[,datasets,numeric-method

Get or remove datasets by numeric index
[[,contacts,numeric-method

Extract or Replace Parts of an Object
[<-,collunit,numeric,ANY,ANY-method

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

Assign taxon field by numeric index
[,site,character-method

Get site field by character index
[[,datasets,numeric-method

Slicer
[<-,taxon,character,ANY,ANY-method

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

Assign dataset field by numeric index
[,collunits,numeric-method

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

Obtain one of the elements within a publication list.
samples,sites-method

samples
[[,collunits,numeric-method

Slicer
set_chronology

set chronology information for a new record.
specimen-class

S4 class for specimen information
show,publication-method

Print publications to screen.
show,dataset-method

Show Dataset Method
show,datasets-method

Show Datasets object as a dataframe
selectMatch

Select the best match for an object.
show,contacts-method

Show a contacts object.
sites-class

An S4 class for multi-site information
samples

Obtain samples from a record or multiple records.
taxa

taxa
[[,sites,numeric-method

Slicer
[[,samples,numeric-method

Slicer
taxa,collunit-method

Extract taxonomic data from a set of sites.
taxa,collunits-method

Extract taxonomic data from a set of sites.
[,taxa,numeric-method

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

Slicer
[<-,collunit,character,ANY,ANY-method

Assign collunit field by numeric index
write.csv,sites-method

write CSV
write.csv,chronologies-method

write CSV
[[<-,samples,ANY,ANY,ANY-method

Insert sample
[[<-,publications,ANY,ANY,ANY-method

Assign value to an element in a publication list.
toWide

toWide
set_default

Set the default chronology within a collectionunit.
set_publications

Create a new publication (or publication set)
[<-,site,character,ANY,ANY-method

Assign site field by numeric index
write.csv,taxa-method

write CSV
[<-,site,numeric,ANY,ANY-method

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

Insert taxon
[[<-,sites,ANY,ANY,ANY-method

Insert site
taxa,site-method

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

Extract taxonomic data from a set of sites.
write.csv,collunits-method

write CSV
write.csv,datasets-method

write CSV
as.data.frame,chronologies-method

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

Convert a publication author to a data.frame
add_chronology

Add a new chronology to a collection unit.