Title: Working with the Neotoma Paleoecology Database
Date: 2025-07-14
Version: 1.0.7
URL: https://github.com/NeotomaDB/neotoma2
BugReports: https://github.com/NeotomaDB/neotoma2/issues
Description: Access and manipulation of data using the Neotoma Paleoecology Database. https://api.neotomadb.org/api-docs/.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.2
Suggests: testthat, knitr, pkgdown, rmarkdown, ggplot2, Bchron, covr
Imports: rlang, magrittr, sf, digest, geojsonsf, purrr, lubridate, httr, jsonlite, methods, dplyr, gtools, leaflet, assertthat, stringr, progress, uuid, utils, tidyr
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2025-07-14 23:39:00 UTC; sedv8808
Author: Dominguez Vidana Socorro ORCID iD [aut, cre], Simon Goring ORCID iD [aut]
Maintainer: Dominguez Vidana Socorro <s.dominguez@ht-data.com>
Repository: CRAN
Date/Publication: 2025-07-15 03:30:02 UTC

Replace part of an object

Description

Assign values to slots within a chronology object.

Usage

## S4 replacement method for signature 'chronology'
x$name <- value

Arguments

x

A chronology object

name

The name of the chronology slot.

value

A value to be assigned to the chronology slot.

Value

reassigned chronology object


Assign collunit field by numeric index

Description

Assign collunit field by numeric index

Usage

## S4 replacement method for signature 'collunit'
x$name <- value

Arguments

x

The collunit object.

name

name of the slot.

value

The value to be used.

Value

assign a new value to a slot


Assign dataset field by numeric index

Description

Assign dataset field by numeric index

Usage

## S4 replacement method for signature 'dataset'
x$name <- value

Arguments

x

The dataset object.

name

name of the slot.

value

The value to be used.

Value

Assign new dataset by numeric index


Assign site field by numeric index

Description

Assign site field by numeric index

Usage

## S4 replacement method for signature 'site'
x$name <- value

Arguments

x

The site object.

name

name of the slot

value

The value to be used.

Value

site object with reassigned values


Assign taxon field by numeric index

Description

Assign taxon field by numeric index

Usage

## S4 replacement method for signature 'taxon'
x$name <- value

Arguments

x

The taxon object.

name

name of the slot.

value

The value to be used.

Value

Assign new taxon by numeric index


Extract

Description

Obtain chronology slots across all chronology elements within a chronologies object.

Usage

## S4 method for signature 'chronologies'
x$name

Arguments

x

chronologies object

name

name of the slot

Value

A multiple chronologies


Extract

Description

Extract chronology metadata by slot name.

Usage

## S4 method for signature 'chronology'
x$name

Arguments

x

chronology object

name

name of the slot

Value

value of the slot name


$

Description

Obtain slots of a collunit without using at-mark

Usage

## S4 method for signature 'collunit'
x$name

Arguments

x

collunit object

name

name of the slot

Value

null prints element of a slot


$ for collunits

Description

Obtain slots of a collunit without using at-mark

Usage

## S4 method for signature 'collunits'
x$name

Arguments

x

collunits object

name

name of the slot

Value

null prints element of a slot


Extract or Replace Parts of an Object

Description

Extract or Replace Parts of an Object

Usage

## S4 method for signature 'contact'
x$name

Arguments

x

A contact object.

name

The name of a contact slot.

Value

value in the selected slot


Extract or Replace Parts of an Object

Description

Extract or Replace Parts of an Object

Usage

## S4 method for signature 'contacts'
x$name

Arguments

x

A contacts object.

name

The name of a contacts slot.

Value

object value from the slot


$

Description

Obtain slots of a dataset without using at-mark

Usage

## S4 method for signature 'dataset'
x$name

Arguments

x

dataset object

name

name of the slot

Value

Obtain a dataset's slot value using $


$ for datasets

Description

Obtain slots of a dataset without using at-mark

Usage

## S4 method for signature 'datasets'
x$name

Arguments

x

datasets object

name

name of the slot.

Value

Obtain a datasets' slot value using $


Extract an element from a publication

Description

Extract an element from a publication

Usage

## S4 method for signature 'publication'
x$name

Arguments

x

A publication object.

name

The slot to obtain (e.g., articletitle)

Value

value in the selected slot


$

Description

Obtain slots of a sample without using at-mark

Usage

## S4 method for signature 'sample'
x$name

Arguments

x

sample object

name

name of the slot

Value

value at selected slot


$ for samples

Description

Obtain slots of a site without using at-mark

Usage

## S4 method for signature 'samples'
x$name

Arguments

x

samples object

name

name of the slot

Value

value at selected slot


$

Description

Obtain slots of a site without using at-mark

Usage

## S4 method for signature 'site'
x$name

Arguments

x

site object

name

name of the slot

Value

value at chosen slot in the site object


$ for sites

Description

Obtain slots of a site without using at-mark

Usage

## S4 method for signature 'sites'
x$name

Arguments

x

sites object

name

name of the slot

Value

value at chosen slot in the site object


$ for taxa

Description

Obtain slots of a taxon without using at-mark

Usage

## S4 method for signature 'taxa'
x$name

Arguments

x

taxa object

name

name of the slot.

Value

Obtain a taxa' slot value using $


$

Description

Obtain slots of a taxon without using at-mark

Usage

## S4 method for signature 'taxon'
x$name

Arguments

x

taxon object

name

name of the slot

Value

Obtain a taxon's slot value using $


Pipe operator

Description

See magrittr::%>% for details.

Usage

lhs %>% rhs

Value

NULL; allows using tidyverse pipe operator.


Assign collunit field by numeric index

Description

Assign collunit field by numeric index

Usage

## S4 replacement method for signature 'collunit,character,ANY,ANY'
x[i] <- value

Arguments

x

The collunit object.

i

The column indicator.

value

The value to be used.

Value

sliced element


Assign collunit field by numeric index

Description

Assign collunit field by numeric index

Usage

## S4 replacement method for signature 'collunit,numeric,ANY,ANY'
x[i] <- value

Arguments

x

The collunit object.

i

The column indicator.

value

The value to be used.

Value

sliced value


Assign dataset field by numeric index

Description

Assign dataset field by numeric index

Usage

## S4 replacement method for signature 'dataset,character,ANY,ANY'
x[i] <- value

Arguments

x

The dataset object.

i

The column indicator.

value

The value to be used.

Value

dataset slot with new assigned character value


Assign dataset field by numeric index

Description

Assign dataset field by numeric index

Usage

## S4 replacement method for signature 'dataset,numeric,ANY,ANY'
x[i] <- value

Arguments

x

The dataset object.

i

The column indicator.

value

The value to be used.

Value

dataset slot with new assigned numeric value


Assign sample field by numeric index

Description

Assign sample field by numeric index

Usage

## S4 replacement method for signature 'sample,character,ANY,ANY'
x[i] <- value

Arguments

x

The sample object.

i

The column indicator.

value

The value to be used.

Value

sample object with reassigned character values


Assign site field by numeric index

Description

Assign site field by numeric index

Usage

## S4 replacement method for signature 'site,character,ANY,ANY'
x[i] <- value

Arguments

x

The site object.

i

The column indicator.

value

The value to be used.

Value

site object with reassigned character values


Assign site field by numeric index

Description

Assign site field by numeric index

Usage

## S4 replacement method for signature 'site,numeric,ANY,ANY'
x[i] <- value

Arguments

x

The site object.

i

The column indicator.

value

The value to be used.

Value

sites object with reassigned numeric values


Assign taxon field by numeric index

Description

Assign taxon field by numeric index

Usage

## S4 replacement method for signature 'taxon,character,ANY,ANY'
x[i] <- value

Arguments

x

The taxon object.

i

The column indicator.

value

The value to be used.

Value

taxon slot with new assigned character value


Assign taxon field by numeric index

Description

Assign taxon field by numeric index

Usage

## S4 replacement method for signature 'taxon,numeric,ANY,ANY'
x[i] <- value

Arguments

x

The taxon object.

i

The column indicator.

value

The value to be used.

Value

taxon slot with new assigned numeric value


Get or remove sites by numeric index

Description

Retrieve sites by numeric index

Usage

## S4 method for signature 'collunits,numeric'
x[i]

Arguments

x

The collunits object

i

The numeric index

Value

null used for side effects. Printing a data.frame


Get or remove datasets by numeric index

Description

Get or remove datasets by numeric index

Usage

## S4 method for signature 'datasets,numeric'
x[i]

Arguments

x

The datasets object

i

The numeric index

Value

Get or remove datasets by numeric index


Get site field by character index

Description

Get site field by character index

Usage

## S4 method for signature 'site,character'
x[i]

Arguments

x

The site object

i

The column indicator

Value

sliced site object


Get site field by numeric index

Description

Get site field by numeric index

Usage

## S4 method for signature 'site,numeric'
x[i]

Arguments

x

The site object

i

The column indicator

Value

sliced site object


Get or remove sites by numeric index

Description

Get or remove sites by numeric index

Usage

## S4 method for signature 'sites,numeric'
x[i]

Arguments

x

The sites object

i

The numeric index

Value

sliced site object


Get or remove taxa by numeric index

Description

Get or remove taxa by numeric index

Usage

## S4 method for signature 'taxa,numeric'
x[i]

Arguments

x

The taxa object

i

The numeric index

Value

Get or remove taxa by numeric index


Insert collunit

Description

Obtain one of the elements within a collunits list

Usage

## S4 replacement method for signature 'collunits,ANY,ANY,ANY'
x[[i]] <- value

Arguments

x

collunits object

i

iteration in collunits list

value

The value to be used

Value

Modified collunits


Insert dataset

Description

Obtain one of the elements within a datasets list

Usage

## S4 replacement method for signature 'datasets,ANY,ANY,ANY'
x[[i]] <- value

Arguments

x

datasets object

i

iteration in datasets list

value

The value to be used

Value

One dataset slot's value


Assign value to an element in a publication list.

Description

Assign value to an element in a publication list.

Usage

## S4 replacement method for signature 'publications,ANY,ANY,ANY'
x[[i]] <- value

Arguments

x

A publications object.

i

A numeric index for the requested publication

value

The value to be used

Value

publications with new assigned value.


Insert sample

Description

Obtain one of the elements within a samples list

Usage

## S4 replacement method for signature 'samples,ANY,ANY,ANY'
x[[i]] <- value

Arguments

x

samples object

i

iteration in samples list

value

The value to be used

Value

samples object with reassigned values


Insert site

Description

Obtain one of the elements within a sites list

Usage

## S4 replacement method for signature 'sites,ANY,ANY,ANY'
x[[i]] <- value

Arguments

x

sites object

i

iteration in sites list

value

The value to be used

Value

sites object with reassigned values


Insert taxon

Description

Obtain one of the elements within a taxa list

Usage

## S4 replacement method for signature 'taxa,ANY,ANY,ANY'
x[[i]] <- value

Arguments

x

taxa object

i

iteration in taxa list

value

The value to be used

Value

One taxon slot's value


Extract

Description

Obtain one of the elements within a chronologies list either by element order or by element name.

Usage

## S4 method for signature 'chronologies,numeric'
x[[i]]

Arguments

x

chronologies object

i

iteration in chronologies list

Value

selected chronology object


Slicer

Description

Obtain one of the elements within a collunits list

Usage

## S4 method for signature 'collunits,numeric'
x[[i]]

Arguments

x

collunits object

i

iteration in collunits list

Value

sliced collunits object


Extract or Replace Parts of an Object

Description

Extract or Replace Parts of an Object

Usage

## S4 method for signature 'contacts,numeric'
x[[i]]

Arguments

x

A contact object.

i

The numeric index of a contact slot.

Value

sliced contacts


Slicer

Description

Obtain one of the elements within a datasets list

Usage

## S4 method for signature 'datasets,numeric'
x[[i]]

Arguments

x

datasets object

i

iteration in datasets list

Value

sliced dataset object


Obtain one of the elements within a publication list.

Description

Obtain one of the elements within a publication list.

Usage

## S4 method for signature 'publications,numeric'
x[[i]]

Arguments

x

A publications object.

i

A numeric index for the requested publication

Value

selected publications object from index


Slicer

Description

Obtain one of the elements within a samples list

Usage

## S4 method for signature 'samples,numeric'
x[[i]]

Arguments

x

samples object

i

iteration in samples list

Value

samples sliced object


Slicer

Description

Obtain one of the elements within a sites list

Usage

## S4 method for signature 'sites,numeric'
x[[i]]

Arguments

x

sites object

i

iteration in sites list

Value

sliced site object

Examples


some_site <- get_sites(sitename = "Site%", limit=3)
some_site[[2]]


Slicer

Description

Obtain one of the elements within a taxa list

Usage

## S4 method for signature 'taxa,numeric'
x[[i]]

Arguments

x

taxa object

i

iteration in taxa list

Value

sliced taxa object


Add a new chronology to a collection unit.

Description

Add a new chronology to a collection unit.

Usage

add_chronology(object, x, y)

Arguments

object

A collectionunit object

x

A chronology object

y

A data.frame of sample ages

Value

chronology object defined by user,


Add a new chronology into an existing collectionunit.

Description

Given a collunit, add a new chronology object to the unit with both the chronology metadata and the age information (as y)

Usage

## S4 method for signature 'collunit,chronology,data.frame'
add_chronology(object, x, y)

Arguments

object

A collection unit object

x

A chronology object generated using set_chronology()

y

A data.frame of sample ages, with required columns: "analysisunitid", "age", "agetype", "ageolder", and "ageyounger".

Details

When undertaking analysis we may wish to add a new chronology to existing records within Neotoma. To do this we must first build the chronology, but also link it to existing analysis units within the collection unit. For examples from this function, see the Complex Workflows documentation online.

Value

chronologies with new added chronology


Convert a publication author to a data.frame

Description

Convert a publication author to a data.frame

Usage

## S4 method for signature 'authors'
as.data.frame(x)

Arguments

x

An author

Value

data.frame with publications metadata


as.data.frame chronologies

Description

Convert all slots within each chronology within a chronologies object to a data.frame.

Usage

## S4 method for signature 'chronologies'
as.data.frame(x)

Arguments

x

chronologies object

Value

data.frame with chronologies metadata


Create a data.frame from a chronology object.

Description

Convert all slots within a chronology to a data.frame.

Usage

## S4 method for signature 'chronology'
as.data.frame(x)

Arguments

x

chronology object

Value

data.frame


as.data.frame site

Description

show as dataframe

Usage

## S4 method for signature 'collunit'
as.data.frame(x)

Arguments

x

site object

Value

data.frame object with a collection units metadata


as.data.frame collunits

Description

show as dataframe as prep to save as csv

Usage

## S4 method for signature 'collunits'
as.data.frame(x)

Arguments

x

collunits object

Value

data.frame of multiple collection units metadata.


Transform a contacts object to a data.frame()

Description

Transform a contacts object to a data.frame()

Usage

## S4 method for signature 'contact'
as.data.frame(x)

Arguments

x

A contact object.

Value

data.frame object with contact metadata


Transform a contacts object to a data.frame()

Description

Transform a contacts object to a data.frame()

Usage

## S4 method for signature 'contacts'
as.data.frame(x)

Arguments

x

A contacts object.

Value

data.frame object with multiple contacts metadata


as.data.frame dataset

Description

show as dataframe as prep to save as csv

Usage

## S4 method for signature 'dataset'
as.data.frame(x)

Arguments

x

dataset object

Value

data.frame with dataset metadata


as.data.frame datasets

Description

show as dataframe as prep to save as csv

Usage

## S4 method for signature 'datasets'
as.data.frame(x)

Arguments

x

datasets object

Value

data.frame with datasets metadata


Convert a publication to a data.frame

Description

Convert a publication to a data.frame

Usage

## S4 method for signature 'publication'
as.data.frame(x)

Arguments

x

A publication object.

Value

data.frame with publications' metadata.


Convert publications to a data.frame

Description

Convert publications to a data.frame

Usage

## S4 method for signature 'publications'
as.data.frame(x)

Arguments

x

A publications object.

Value

data.frame with publications' metadata.


as.data.frame site

Description

show as dataframe as prep to save as csv

Usage

## S4 method for signature 'site'
as.data.frame(x)

Arguments

x

site object

Value

data.frame object with site metadata


as.data.frame sites

Description

shows object as data.frame

Usage

## S4 method for signature 'sites'
as.data.frame(x)

Arguments

x

sites object

Value

data.frame object with sites metadata


as.data.frame taxa

Description

show as dataframe as prep to save as csv

Usage

## S4 method for signature 'taxa'
as.data.frame(x)

Arguments

x

taxa object

Value

data.frame with taxa metadata


as.data.frame taxon

Description

show as dataframe as prep to save as csv

Usage

## S4 method for signature 'taxon'
as.data.frame(x)

Arguments

x

taxon object

Value

data.frame with taxon metadata


as.list sites

Description

show as dataframe as prep to save as csv

Usage

## S4 method for signature 'sites'
as.list(x)

Arguments

x

sites object

Value

list object with sites metadata


An S4 class for the authors of a Neotoma publication.

Description

This class combines the S4 class contact with a numeric author order. This allows us to reuse contact objects, and to assign the authorship order within a publication. The full set of authors for a publication are represented by the authors object.

Value

object of class author

Examples

{
simon <- new("contact", familyname = "Goring", givennames = "Simon J.")
firstauthor <- new("author", author = simon, order = 1)
}

An S4 class for a set of Neotoma author objects.

Description

The S4 authors are a set of individual author objects that are then associated with a single S4 publication class.

Value

object of class authors

Examples

{
simon <- new("contact", familyname = "Goring", givennames = "Simon J.")
socorro <- new("contact", familyname = "Dominguez", givennames = "Socorro")
first_author <- new("author", author = simon, order = 1)
second_author <- new("author", author = socorro, order = 2)
author_list <- new("authors", authors = list(first_author, second_author))
}

Build a specimen objects.

Description

A helper function to build a specimen object from a list returned by the Neotoma API call. The function is not exported, but called from the get_specimens() call.

Usage

build_specimen(x)

Arguments

x

specimen list

Value

A simple specimen object


c Method - Combine chronologies objects

Description

c Method - Combine chronologies objects

Usage

## S4 method for signature 'chronologies'
c(x, y)

Arguments

x

chronologies object 1

y

chronologies object 2

Value

concatenated chronologies


c Method - Combine collunits objects

Description

c Method - Combine collunits objects

Usage

## S4 method for signature 'collunits'
c(x, y)

Arguments

x

collunits object 1

y

collunits object 2

Value

concatenated collection units without duplicates


c Method - Combine contacts objects

Description

c Method - Combine contacts objects

Usage

## S4 method for signature 'contact'
c(x, y)

Arguments

x

contacts object 1

y

contacts object 2

Value

contacts concatenated object


c Method - Combine contacts objects

Description

c Method - Combine contacts objects

Usage

## S4 method for signature 'contacts'
c(x, y)

Arguments

x

contacts object 1

y

contacts object 2

Value

concatenated and clean objects


c Method - Combine datasets objects

Description

c Method - Combine datasets objects

Usage

## S4 method for signature 'datasets'
c(x, y)

Arguments

x

datasets object 1

y

datasets object 2

Value

concatenated datasets object


c Method for NULL values

Description

c Method for NULL values

c Method for NULL values

Usage

## S4 method for signature 'missingOrNULL'
c(x = "missingORNULL", y)

## S4 method for signature 'missingOrNULL'
c(x = "missingORNULL", y)

Arguments

x

NULL object

y

sites/datasets object

Value

concatenated collunits object

list of concatenated items when the first object is NULL


Combine publication objects.

Description

Combine publication objects.

Usage

## S4 method for signature 'publications'
c(x, y)

Arguments

x

A publications object.

y

A publications object

Value

concatenated publications object


c Method - Combine datasets objects

Description

c Method - Combine datasets objects

Usage

## S4 method for signature 'samples'
c(x, y)

Arguments

x

datasets object 1

y

datasets object 2

Value

concatenated samples object


c Method - Combine sites objects

Description

c Method - Combine sites objects

Usage

## S4 method for signature 'sites'
c(x, y)

Arguments

x

sites object 1

y

sites object 2

Value

concatenated and cleaned sites object


c Method - Combine taxa objects

Description

c Method - Combine taxa objects

Usage

## S4 method for signature 'taxa'
c(x, y)

Arguments

x

taxa object 1

y

taxa object 2

Value

concatenated taxa object


Check contact information for a record against Neotoma contributors

Description

Uses the Neotoma API to search and access information about individuals who have contributed to the data in the Neotoma Paleoecology Database

Usage

check_contacts(x, ...)

Arguments

x

contacts A contacts object associated with a set of names.

...

Additional parameters associated with the call.

Value

contacts object


Get contact information for Neotoma contributors

Description

Get contact information for Neotoma contributors

Usage

## S3 method for class 'contacts'
check_contacts(x, similarity = 0.5, ...)

Arguments

x

contacts A contacts object associated with a set of names.

similarity

The similarity score between matched records (from 0 - 1).

...

Additional parameters associated with the call.

Value

contacts object


chroncontrols

Description

Show the samples table

Usage

chroncontrols(x)

Arguments

x

Sites object to extract chroncontrols table from

Value

data.frame with chroncontrols information


Recover information about the chron controls for a collectionunit.

Description

For a site that includes collection units with chronologies return the chronological controls that are used in building the chronology.

Usage

## S4 method for signature 'site'
chroncontrols(x)

Arguments

x

site object

Value

data.frame with chronological controls


Recover information about the chron controls for a collectionunit.

Description

For all sites that includes collection units with chronologies return the chronological controls that are used in building the chronology.

Usage

## S4 method for signature 'sites'
chroncontrols(x)

Arguments

x

sites object

Value

data.frame with chronological controls


Obtain the chronology from a record or multiple records.

Description

Obtain the chronology from a record or multiple records.

Usage

chronologies(x)

Arguments

x

sites object that contains chronologies

Value

chronologies object with all chronologies used.


Extract chronologies from a collunit object.

Description

Extract chronologies from a collunit object.

Usage

## S4 method for signature 'collunit'
chronologies(x)

Arguments

x

A collunit object

Value

chronologies from a collunit object


Extract chronologies from a collunits object.

Description

Extract chronologies from a collunits object.

Usage

## S4 method for signature 'collunits'
chronologies(x)

Arguments

x

A collunits object

Value

chronologies from a collunits object


Extract chronologies from a site object.

Description

Extract chronologies from a site object.

Usage

## S4 method for signature 'site'
chronologies(x)

Arguments

x

A site object

Value

chronologies from a site object


Extract chronologies from a sites object.

Description

Extract chronologies from a sites object.

Usage

## S4 method for signature 'sites'
chronologies(x)

Arguments

x

A sites object

Value

chronologies from a sites object


S4 class for chronologies information

Description

The grouped class for chronologies from the Neotoma Paleoecology Database.

Value

object of class chronologies


S4 class for chronologies information

Description

The class for chronologies from the Neotoma Paleoecology Database. A single collection unit may have one or more chronology. These individual chronology classes are then grouped into an S4 chronologies class.

Value

object of class chronology


Generate a data citation from a Neotoma2 object.

Description

The function, applied to a data object with a valid dataset, will return a properly formatted data citation for the record.

Usage

cite_data(x)

Arguments

x

Object with DOIs associated to it.

Value

data.frame with citation data


Obtain data citations from a single record.

Description

Given complete dataset objects in Neotoma (must have used get_datasets() or get_downloads()), return a formatted citation for the record, including the dataset DOI.

Usage

## S4 method for signature 'site'
cite_data(x)

Arguments

x

sites object

Value

data.frame object with citation information.

Examples


ds <- get_datasets(1)
cite_data(ds)


Obtain data citations from multiple records.

Description

Given complete dataset objects in Neotoma (must have used get_datasets() or get_downloads()), return a formatted citation for the record, including the dataset DOI.

Usage

## S4 method for signature 'sites'
cite_data(x)

Arguments

x

sites object

Value

data.frame object with citation information.

Examples

{
ds <- get_datasets(1)
cite_data(ds)
}

S4 class for collection units information.

Description

A collection unit represents a collection event from within a site. For example, a lake sediment core, or a single dig site within an archaeological site.

Value

object of class collunit


Extract collection units from a sites object

Description

Extract collection units from a sites object

Usage

collunits(object)

Arguments

object

A sites object

Value

collunits detail from a sites object


Extract collunits from a site object.

Description

Extract collunits from a site object.

Usage

## S4 method for signature 'site'
collunits(object)

Arguments

object

A site object

Value

collunits from a site object


Extract collunits from a sites object.

Description

Extract collunits from a sites object.

Usage

## S4 method for signature 'sites'
collunits(object)

Arguments

object

A sites object

Value

collunits from a sites object


An S4 class for Neotoma Collection Units

Description

Holds Collection unit information from the Neotoma Paleoecology Database. @returns object of class collunits


An S4 class for Neotoma contacts

Description

The object that contains the contact information for an individual, along with associated metadata.

Value

object of class contact

Examples

new("contact", familyname = "Goring", givennames = "Simon J.")

An S4 class for multi-contact information from the Neotoma Paleoecology Database.

Description

An unordered list of individual S4 contact objects.

Value

object of class contacts

Examples

{
# Create two contact objects and associate them within a contacts object.
simon <- new("contact", familyname = "Goring", givennames = "Simon J.")
socorro <- new("contact", familyname = "Dominguez", givennames = "Socorro")
packagers <- new("contacts", contacts = list(simon, socorro))
packagers
}

Obtain coordinates from a sites object.

Description

Obtain coordinates from a sites object.

Usage

coordinates(obj, ...)

Arguments

obj

A sites object

...

Additional parameters associated with the call.

Value

dataframe with coordinate values


Return the latitude and longitude of sites

Description

Return the latitude and longitude of sites

Usage

## S4 method for signature 'sites'
coordinates(obj, ...)

Arguments

obj

A sites object

...

Additional parameters associated with the call.

Value

data.frame object with site coordinates.


S4 class for dataset information

Description

The standard object class for datasets from the Neotoma Paleoecology Database.

Value

object of class dataset


Extract datasets from a sites object.

Description

If the sites object contains datasets, then the datasets will be returned. If the sites object does not contain datasets then the user can apply get_datasets() to the object.

Usage

datasets(object)

Arguments

object

A sites object

Value

datasets object specific to the metadata contained in datasets


Extract datasets from a collunit object.

Description

Extract datasets from a collunit object.

Usage

## S4 method for signature 'collunit'
datasets(object)

Arguments

object

A collunit object

Value

datasets from a collunit object


Extract datasets from a collunits object.

Description

Extract datasets from a collunits object.

Usage

## S4 method for signature 'collunits'
datasets(object)

Arguments

object

A collunits object

Value

datasets from a collunits object


Extract datasets from a site object.

Description

Extract datasets from a site object.

Usage

## S4 method for signature 'site'
datasets(object)

Arguments

object

A site object

Value

datasets from a site object


Extract datasets from a sites object.

Description

Extract datasets from a sites object.

Usage

## S4 method for signature 'sites'
datasets(object)

Arguments

object

A sites object

Value

datasets from a sites object


S4 class for datasets information

Description

The grouped class for datasets from the Neotoma Paleoecology Database.

Value

object of class datasets


Obtain the DOI for publications or datasets.

Description

Obtain the DOI for publications or datasets.

Usage

doi(x)

Arguments

x

Object with DOIs associated to it.

Value

doi object with DOI information


Get a publication DOI.

Description

Get a publication DOI.

Usage

## S4 method for signature 'publication'
doi(x)

Arguments

x

A publication object.

Value

DOI from a publication


Obtain dataset DOIs from records.

Description

Given complete dataset objects in Neotoma (must have used get_datasets() or get_downloads()), return the dataset DOI for the record.

Usage

## S4 method for signature 'site'
doi(x)

Arguments

x

a Neotoma2 site object

Value

data.frame object with DOIs information.

Examples

{
ds <- get_datasets(1)
doi(ds)
}

Obtain dataset DOIs from records.

Description

Given complete dataset objects in Neotoma (must have used get_datasets() or get_downloads()), return the dataset DOI for the record.

Usage

## S4 method for signature 'sites'
doi(x)

Arguments

x

a Neotoma2 site object

Value

data.frame object with DOIs information.

Examples

{
ds <- get_datasets(1)
doi(ds)
}

Apply a filter for Neotoma sites objects.

Description

The filter function takes a sites object and allows a user to filter on a number of properties. Since a sites object is a nested object (it contains collection units, datasets, samples, etc.) the degree to which filtering occurs depends on the amount of data contained within the sites object. Filtering parameters include:

Usage

filter(x, ...)

Arguments

x

A site, dataset or download.

...

arguments to filter by.

Value

filtered sites object


Apply a filter for Neotoma sites objects.

Description

The filter function takes a sites object and allows a user to filter on a number of properties. Since a sites object is a nested object (it contains collection units, datasets, samples, etc.) the degree to which filtering occurs depends on the amount of data contained within the sites object. Filtering parameters include:

Usage

## S3 method for class 'sites'
filter(x, ...)

Arguments

x

A sites object.

...

arguments to filter by.

Value

filtered sites object

Examples


# Download 100 sites, but only keep the sites that are close to sea level.
some_sites <- get_sites(sitename = "Lake%", limit = 3)
site_subset <- some_sites %>% filter(altitude < 100)
# Download 100 sites, get all associated datasets, but keep only
# sites/datasets that are of datasettype "pollen":
sites <- get_sites(limit = 1) %>%
  get_datasets()
pollen_subset <- sites %>% filter(datasettype == "pollen")


Get contact information for Neotoma contributors

Description

Uses the Neotoma API to search and access information about individuals who have contributed to the data in the Neotoma Paleoecology Database

Usage

get_contacts(x = NA, ...)

Arguments

x

integer A contact ID

...

(contactname) A full or partial name for an individual contributor to the database. (familyname) The full or partial last name for an individual contributor to the database. (status) The current status of the contributor (active or retired)

Value

contacts object


Get contact information for Neotoma contributors

Description

Uses the Neotoma API to search and access information about individuals who have contributed to the data in the Neotoma Paleoecology Database

Usage

## Default S3 method:
get_contacts(x, ...)

Arguments

x

integer A contact ID

...

(contactname) A full or partial name for an individual contributor to the database. (familyname) The full or partial last name for an individual contributor to the database. (status) The current status of the contributor (active or retired)

Value

contacts object


Get contact information for Neotoma contributors

Description

Uses the Neotoma API to search and access information about individuals who have contributed to the data in the Neotoma Paleoecology Database

Usage

## S3 method for class 'numeric'
get_contacts(x, ...)

Arguments

x

integer A contact ID

...

(contactname) A full or partial name for an individual contributor to the database. (familyname) The full or partial last name for an individual contributor to the database. (status) The current status of the contributor (active or retired)

Value

contacts object


get_datasets

Description

The get_datasets() function is a wrapper for the Neotoma datasets API endpoint. The function takes parameters defined by the user and returns dataset information supplied by the Neotoma Paleoecological Database. The user may define all or none of the possible fields.

Usage

get_datasets(x = NA, ...)

Arguments

x

A single datasetid, or a vector of unique dataset ids.

...

accepted arguments, see details for more information.

Details

A dataset is an element nested within neotoma2 site objects. The get_datasets() call returns a list of individual site objects with collunits (collection units) that contain valid, matching dataset elements. So, get_sites() returns only site metadata. get_datasets() returns site metadata, plus metadata about the individual datasets present at that site. The get_datasets() function searches for each site within Neotoma that matches the query parameters, and returns them as a sites object, a list of site objects, plus returns all the additional metadata for the datasets at that site. The get_datasets() command wraps the Neotoma API (api.neotomadb.org) call for datasets. The call itself uses a SQL query which accepts any one of the following parameters:

Value

The function returns either a single item of class "try-error" describing the reason for failure (either misdefined parameters or an error from the Neotoma API), or list of site objects, each containing one or more collunit objects, with fully populated datasets elements.

Author(s)

Socorro Dominguez dominguezvid@wisc.edu

Examples


# To find all datasets with a min altitude of 12 and a max altitude of 25:
sites_12to25 <- get_datasets(altmin=12, altmax=25)
# To find all datasets in Brazil
brazil <- '{"type": "Polygon",
"coordinates": [[
 [-73.125, -9.102096738726443],
 [-56.953125,-33.137551192346145],
 [-36.5625,-7.710991655433217],
 [-68.203125,13.923403897723347],
 [-73.125,-9.102096738726443]]]}'
brazil_datasets <- get_datasets(loc = brazil[1], limit=2)
# To obtain the dataset metadata:
datasets(brazil_datasets)
# There is insufficient metadata at this point to obtain information
# about taxa present at the site. We must use get_downloads() to
# obtain the full set of sample information:
# This fails: taxa(brazil_datasets)


Get Dataset Default

Description

Get Dataset Default

Usage

## Default S3 method:
get_datasets(x, ...)

Arguments

x

Use a single number to extract dataset information

...

accepted arguments, see details for more information.

Value

sites object with full metadata up to the dataset level


Get Dataset Numeric

Description

Get Dataset Numeric

Usage

## S3 method for class 'numeric'
get_datasets(x, ...)

Arguments

x

Use a single number to extract site information

...

Additional parameters to get_datasets

Value

sites object with full metadata up to the dataset level

Examples


allds <- get_datasets(1:3)


Get Dataset from a site object.

Description

Get Dataset from a site object.

Usage

## S3 method for class 'site'
get_datasets(x, ...)

Arguments

x

An object of class site.

...

additional arguments accepted by get_datasets()

Value

sites object with full metadata up to the dataset level

Examples


random_sites <- get_sites(1)
allds <- get_datasets(random_sites, limit=3)


Get Dataset from a sites object.

Description

Get Dataset from a sites object.

Usage

## S3 method for class 'sites'
get_datasets(x, ...)

Arguments

x

An object of class sites.

...

additional arguments accepted by get_datasets()

Value

sites object with full metadata up to the dataset level

Examples


random_sites <- get_sites(1)
allds <- get_datasets(random_sites, limit=3)


get_downloads

Description

Information for Fossil Datasets

Usage

get_downloads(x = NA, verbose = TRUE, ...)

Arguments

x

Use a single number to extract site information

verbose

Status bar of items being downloaded

...

accepted arguments: sites, datasets

Details

The get_downloads() command wraps the Neotoma API (api.neotomadb.org) call for downloads. The call itself uses a SQL query which accepts any one of the following parameters:

Value

The function returns either a single item of class "try-error" describing the reason for failure (either misdefined parameters or an error from the Neotoma API), or a table of sites, with rows corresponding to the number of individual sites and datasets returned by the Neotoma API. Each "site" object contains 6 parameters that can be accessed as well:

siteid

site ID number

sitename

site's name

location

sf object that describes site's location

description
collunits

limited information on collunits

Each "collection unit" embedded in the "sites" object contains 6 parameters that can be accessed as well:

collunitid

collection unit ID number

handle

collection unit's handle

collunitname

collection unit's name

colldate

date in collection unit

substrate

substrate

location

sf object that describes site's location

datasets

detailed information regarding dataset

Each "dataset" nested in the "collection unit" contains the following detail of information:

datasetid

dataset ID number

datasetname

site's name

datasettype

type of data found

location

sf object that describes site's location

notes

notes on the dataset

taxa table

taxa table

pi list

P.I. info

analyst

analyst info

metadata

dataset metadata

Author(s)

Socorro Dominguez dominguezvid@wisc.edu

Examples


# To find the downloads object of dataset 24:
downloads24 <- get_downloads(24)

# To find all downloads in Brazil
brazil <- '{"type": "Polygon",
"coordinates": [[
 [-73.125, -9.102096738726443],
 [-56.953125,-33.137551192346145],
 [-36.5625,-7.710991655433217],
 [-68.203125,13.923403897723347],
 [-73.125,-9.102096738726443]]]}'
brazil_datasets <- get_datasets(loc = brazil[1])
brazil_downloads <- get_downloads(brazil_datasets)


get_downloads

Description

get_downloads

Usage

## S3 method for class 'numeric'
get_downloads(x, ...)

Arguments

x

Use a single number to extract site information

...

arguments in ellipse form

Value

The function returns either a single item of class "try-error" describing the reason for failure (either misdefined parameters or an error from the Neotoma API), or a table of sites, with rows corresponding to the number of individual sites and datasets returned by the Neotoma API.


get_downloads sites

Description

get_downloads sites

Usage

## S3 method for class 'sites'
get_downloads(x, verbose = TRUE, ...)

Arguments

x

sites object

verbose

Should text be printed during the download process?

...

arguments in ellipse form

Value

The function returns either a single item of class "try-error" describing the reason for failure (either misdefined parameters or an error from the Neotoma API), or a table of sites, with rows corresponding to the number of individual sites and datasets returned by the Neotoma API.


get_manual

Description

Open up the Neotoma manual homepage.

Usage

get_manual()

Value

NULL side effect for opening browser with the manual

Author(s)

Simon Goring goring@wisc.edu

Examples

{
# This call does not work from `source()` calls or in testing.
# interactive() just lets us know you are interacting with the console:
if (interactive()) {
 get_manual()
}
}


Get publication information for Neotoma records

Description

Uses the Neotoma API to search and access information about publications associated with data in the Neotoma Paleoecology Database

Usage

get_publications(x = NA, ...)

Arguments

x

integer A contact ID

...

publicationid The unique numeric identifier associated with a publication in Neotoma. datasetid A unique identifier for a Neotoma dataset that is associated with a publication. familyname The full or partial last name for an individual author. pubtype The publication type, from get_tables("publicationtypes"). year The year the publication was released. search A plain text search string used to search the citation.

Value

publications object

Examples


# How old are the papers in Neotoma that include the term "mammut"?
mammoth_papers <- get_publications(search="mammut") %>%
  as.data.frame()
hist(as.numeric(mammoth_papers$year))


Get publication information from Neotoma

Description

Get publication information from Neotoma

Usage

## Default S3 method:
get_publications(...)

Arguments

...

publicationid The unique numeric identifier associated with a publication in Neotoma. datasetid A unique identifier for a Neotoma dataset that is associated with a publication. familyname The full or partial last name for an individual author. pubtype The publication type, from get_tables("publicationtypes"). year The year the publication was released. search A plain text search string used to search the citation.

Value

publications object

Examples


# How old are the papers in Neotoma that include the term "mammut"?
mammoth_papers <- get_publications(search="mammut") %>%
  as.data.frame()
hist(as.numeric(mammoth_papers$year))


Get publications using their unique identifier.

Description

Get publications using their unique identifier.

Usage

## S3 method for class 'numeric'
get_publications(x, ...)

Arguments

x

integer A contact ID

...

publicationid The unique numeric identifier associated with a publication in Neotoma. datasetid A unique identifier for a Neotoma dataset that is associated with a publication. familyname The full or partial last name for an individual author. pubtype The publication type, from get_tables("publicationtypes"). year The year the publication was released. search A plain text search string used to search the citation.

Value

publications object

Examples

{
# We want the paper identified in Neotoma as 666:
get_publications(666)
}

Update information for a publications object.

Description

This works for records without publicationids. We assume that data with publicationids is correct.

Usage

## S3 method for class 'publication'
get_publications(x, ...)

Arguments

x

integer A publication

...

publicationid The unique numeric identifier associated with a publication in Neotoma. datasetid A unique identifier for a Neotoma dataset that is associated with a publication. familyname The full or partial last name for an individual author. pubtype The publication type, from get_tables("publicationtypes"). year The year the publication was released. search A plain text search string used to search the citation.

Value

updated publication object

Examples


# Take a publication object and purposely degrade the metadata:
bad_pub <- get_publications(666)
# Note this only changes the reported year, not the citation string.
bad_pub[[1]]@year <- "1923"
bad_pub[[1]]@publicationid <- NA_integer_
updated_pubs <- get_publications(bad_pub[[1]])
attr(updated_pubs, "matches")
# we see the proper citation in the record:
updated_pubs <- attr(updated_pubs, "matches")[[3]]


Update metadata for a set of publication objects.

Description

Update metadata for a set of publication objects.

Usage

## S3 method for class 'publications'
get_publications(x, ...)

Arguments

x

integer A publication

...

publicationid The unique numeric identifier associated with a publication in Neotoma. datasetid A unique identifier for a Neotoma dataset that is associated with a publication. familyname The full or partial last name for an individual author. pubtype The publication type, from get_tables("publicationtypes"). year The year the publication was released. search A plain text search string used to search the citation.

Value

publications object

Examples


# Take a publication object and purposely degrade the metadata:
bad_pub <- get_publications(c(666, 667, 668))
# Note this only changes the reported year, not the citation string.
bad_pub[[1]]@year <- "1923"
bad_pub[[1]]@publicationid <- NA_integer_
updated_pubs <- get_publications(bad_pub)
# Only the first publication object has any matches. It's the only one
# that is missing its publicaitonid.
attr(updated_pubs[[1]], "matches")
attr(updated_pubs[[2]], "matches")
# we see the proper citation in the record:
updated_pubs[[1]] <- attr(updated_pubs[[1]], "matches")[[1]]


get_sites

Description

The get_sites() function is a wrapper for the Neotoma sites API endpoint. The function takes parameters defined by the user and returns a list of site information supplied by the Neotoma Paleoecological Database. The user may define all or none of the possible fields.

Usage

get_sites(x = NA, ...)

Arguments

x

Use a single integer or vector of integers representing unique Neotoma site identifiers (siteids) to extract site information.

...

accepted arguments, see details for more information.

Details

A site object in Neotoma is a physical location at which one or more collection units are located. Each collection unit may have one or more datasets within it, defined by the dataset type. The get_sites() function searches for each site within Neotoma that matches the query parameters, and returns them as a sites object, a list of site objects. The get_sites() command wraps the Neotoma API (api.neotomadb.org) call for sites. The call itself uses a SQL query which accepts any one of the following parameters:

Value

The function returns either a single item of class "try-error" describing the reason for failure (either misdefined parameters or an error from the Neotoma API), or a table of sites, with rows corresponding to the number of individual sites returned by the Neotoma API. Each "site" object contains 6 parameters that can be accessed as well: siteid, sitename, location, altitude, description, limited collection units information.

Author(s)

Socorro Dominguez dominguezvid@wisc.edu

Examples


## Find sites with a min altitude of 12m and a max altitude of 25m
sites_12to25 <- get_sites(altmin=12, altmax=25)
## Return all sites, using a minimum altitude of 2500m (returns >500 sites):
sites_2500 <- get_sites(altmin=2500, all_data = TRUE)
## To find sites in Brazil
brazil <- '{"type": "Polygon",
"coordinates": [[
 [-73.125, -9.102096738726443],
 [-56.953125,-33.137551192346145],
 [-36.5625,-7.710991655433217],
 [-68.203125,13.923403897723347],
 [-73.125,-9.102096738726443]]]}'
brazil_sites <- get_sites(loc = brazil[1])

# Finding all sites with Liliaceae pollen in 1000 year bins:
lilysites <- c()
for (i in seq(0, 10000, by = 1000)) {
  lily <- get_sites(taxa=c("Liliaceae"),
                    ageyoung = i - 500,
                    ageold = i + 500,
                    all_data = TRUE)
  lilysites <- c(lilysites, length(lily))
}


get_sites

Description

get_sites

Usage

## Default S3 method:
get_sites(...)

Arguments

...

One of a set of possible query parameters discussed in details.

Value

The function returns either a single item of class "try-error" describing the reason for failure (either misdefined parameters or an error from the Neotoma API), or a table of sites, with rows corresponding to the number of individual sites returned by the Neotoma API. Each "site" object contains 6 parameters that can be accessed as well: siteid, sitename, location, altitude, description, limited collection units information.

Author(s)

Socorro Dominguez dominguezvid@wisc.edu


Get Site Information for Fossil Sites

Description

Get Site Information for Fossil Sites

Usage

## S3 method for class 'numeric'
get_sites(x, ...)

Arguments

x

The numeric site ID from Neotoma

...

accepted arguments if numeric all_data

Value

The function returns either a single item of class "try-error" describing the reason for failure (either misdefined parameters or an error from the Neotoma API), or a table of sites, with rows corresponding to the number of individual sites returned by the Neotoma API. Each "site" object contains 6 parameters that can be accessed as well: siteid, sitename, location, altitude, description, limited collection units information.

Examples

{
## Find all sites by numeric siteid:
sites <- get_sites(seq(1,3))
}

get_stats

Description

Returns a count of sites, datasets, publications and other objects added to Neotoma during the requested time period.

Usage

get_stats(start, end)

Arguments

start

The starting month (from present == 0) for which to generate the summary.

end

The ending month (from present == 0) for which to generate the summary.

Details

This function returns summaries about the data holdings within Neotoma using the existing Neotoma API's summary endpoint. This can provide information about recent uploads (the number of new sites uploaded within the last month, for example), or can be used to provide information about the overall number of sites/datasets (using an arbitrarily high value for end).

Value

data.frame with summary statistics

Author(s)

Socorro Dominguez dominguezvid@wisc.edu

Simon Goring goring@wisc.edu

Examples


last_month <- get_stats(start = 0, end = 1)


Get table record from Neotoma

Description

Call Neotoma and return a table (with limits & offsets for large tables)

Usage

get_table(x, limit = 25, offset = 0)

Arguments

x

Table name (consult https://open.neotomadb.org/dbschema/ for a complete list of table names.

limit

Default 25 records

offset

Default 0.

Value

selected table values from the Database

Examples

{
# Returns only the first 25 specimen records.
someSpec <- get_table('specimens')
}

get_taxa

Description

a sites object with the requested taxa.

Usage

get_taxa(x = NA, ...)

Arguments

x

string taxa name or names

...

accepted arguments, see details for more information.

Value

A Neotoma2 sites object with datasets with the requested taxa.


Get Taxa Default

Description

Get Taxa Default

Usage

## Default S3 method:
get_taxa(x, ...)

Arguments

x

Use a taxon ID to extract site information

...

accepted arguments, see details for more information.

Value

sites object containing the requested taxa


get_taxon

Description

a sites object with the requested taxa.

Usage

get_taxon(x = NA, ...)

Arguments

x

string taxa name or names

...

accepted arguments, see details for more information.

Value

A Neotoma2 sites object with datasets with the requested taxa.


Get Taxa Default

Description

Get Taxa Default

Usage

## Default S3 method:
get_taxon(x, ...)

Arguments

x

Use a taxon ID to extract site information

...

accepted arguments, see details for more information.

Value

sites object containing the requested taxa


Get Taxa Numeric

Description

Get Taxa Numeric

Usage

## S3 method for class 'numeric'
get_taxon(x, ...)

Arguments

x

Use a taxon ID to extract sites information

...

Additional parameters to get_taxa

Value

sites object with requested taxa

Examples


allds <- get_datasets(1:3)


Get object IDs

Description

This function parses a site object, from site to dataset level and returns a data.frame that contains the site, collectionunit and dataset IDs for each element within the site.

Usage

getids(x, order = TRUE)

Arguments

x

A Neotoma2 sites object.

order

sort items by siteid, collunitid, datasetid

Value

data.frame containing siteid, datasetid, and collunitid


Get object IDs from a single collectionunit.

Description

From a collectionunit object, return the collectionunit and dataset ids.

Usage

## S3 method for class 'collunit'
getids(x, order = TRUE)

Arguments

x

A Neotoma2 collunit object.

order

sort items by siteid, collunitid, datasetid

Value

data.frame containing siteid, datasetid, and collunitid

Examples


marion <- get_sites(sitename = "Marion Lake") 
collunitids <- getids(collunits(marion)[[1]])


Get object IDs from collectionunits.

Description

From a set of collectionunit objects, return the collectionunit and dataset ids.

Usage

## S3 method for class 'collunits'
getids(x, order = TRUE)

Arguments

x

A Neotoma2 collunits object.

order

sort items by siteid, collunitid, datasetid

Value

data.frame containing siteid, datasetid, and collunitid

Examples


marion <- get_sites(sitename = "Marion Lake")
collunitids <- getids(collunits(marion))


Get object IDs from a site object.

Description

Get object IDs from a site object.

Usage

## S3 method for class 'site'
getids(x, order = TRUE)

Arguments

x

A Neotoma2 site object.

order

sort items by siteid, collunitid, datasetid

Value

data.frame containing siteid, datasetid, and collunitid


Get object IDs from sites

Description

Get object IDs from sites

Usage

## S3 method for class 'sites'
getids(x, order = TRUE)

Arguments

x

A Neotoma2 sites object.

order

sort items by siteid, collunitid, datasetid

Value

data.frame containing siteid, datasetid, and collunitid


Length Method chronologies

Description

Length Method chronologies

Usage

## S4 method for signature 'chronologies'
length(x)

Arguments

x

chronologies object

Value

integer describing length


Length Method collunits

Description

Length Method collunits

Usage

## S4 method for signature 'collunits'
length(x)

Arguments

x

collunits object

Value

length of a collunits object


Length Method datasets

Description

Length Method datasets

Usage

## S4 method for signature 'datasets'
length(x)

Arguments

x

datasets object

Value

int that showcases the length of a datasets object


Get the number of publications in a publications object.

Description

Get the number of publications in a publications object.

Usage

## S4 method for signature 'publications'
length(x)

Arguments

x

A publications object.

Value

int of the length of the publications object


Length Method samples

Description

Length Method samples

Usage

## S4 method for signature 'samples'
length(x)

Arguments

x

samples object

Value

int representing the length of ⁠samples object⁠


Length Method Sites

Description

Length Method Sites

Usage

## S4 method for signature 'sites'
length(x)

Arguments

x

sites object

Value

int with the length of sites object


Length Method taxa

Description

Length Method taxa

Usage

## S4 method for signature 'taxa'
length(x)

Arguments

x

taxa object

Value

int that showcases the length of a taxa object


c Method - Combine objects, including NULL

Description

c Method - Combine objects, including NULL

c Method - Combine objects, including NULL


Get slot names

Description

Get all names for named elements within a collunit object.

Usage

## S4 method for signature 'collunit'
names(x)

Arguments

x

A collection unit object.

Value

NULL. Shows the names of the slots


Get names of contacts slots

Description

Get names of contacts slots

Usage

## S4 method for signature 'contact'
names(x)

Arguments

x

A contact object.

Value

names of slots


Get slot names

Description

Get all names for named elements within a dataset object.

Usage

## S4 method for signature 'dataset'
names(x)

Arguments

x

A dataset object.

Value

list with all names of dataset slots


Get slot names for a publication object.

Description

Get slot names for a publication object.

Usage

## S4 method for signature 'publication'
names(x)

Arguments

x

A publication object.

Value

string with publication slots' names


Get slot names for a publication object.

Description

Get slot names for a publication object.

Usage

## S4 method for signature 'publications'
names(x)

Arguments

x

A publications object.

Value

string with publications slots' names


Get slot names

Description

Get all names for named elements within a site object.

Usage

## S4 method for signature 'site'
names(x)

Arguments

x

A site object.

Value

names of the slots of a site object


Get slot names

Description

Get all names for named elements within a taxon object.

Usage

## S4 method for signature 'taxon'
names(x)

Arguments

x

A taxon object.

Value

list with all names of taxon slots


pingNeotoma

Description

A quick function to test whether or not the Neotoma Database API is currently running.

Usage

pingNeotoma(server = "neotoma")

Arguments

server

One of localhost:PORT (where PORT is a valid numeric port), neotoma or dev.

Value

A valid HTTP status code or returns an error if a connection is refused.

Examples

{
test_connection <- pingNeotoma("neotoma")
}

Plot site coordinates using a basic plot.

Description

Plot site coordinates using a basic plot.

Usage

## S4 method for signature 'sites'
plot(x, y, ...)

Arguments

x

sites object

y

ANY

...

Additional parameters associated with the call.

Value

plot object with site coordinates.


plotLeaflet

Description

Plot sites on a leaflet map

Usage

plotLeaflet(object)

Arguments

object

Sites object to plot

Value

leaflet map with site markers

Author(s)

Socorro Dominguez dominguezvid@wisc.edu


plotLeaflet

Description

Plot a site on a leaflet map

Usage

## S4 method for signature 'site'
plotLeaflet(object)

Arguments

object

Site object to plot

Value

leaflet map

Examples


modernSites <- get_sites(keyword = "Modern")
plotLeaflet(modernSites[[1]])


plotLeaflet

Description

Plot sites on a leaflet map

Usage

## S4 method for signature 'sites'
plotLeaflet(object)

Arguments

object

Sites object to plot

Value

leaflet map

Examples


# Note that by default the limit for queries is 25 records:
modernSites <- get_sites(keyword = "Modern")
plotLeaflet(modernSites)


An S4 class for a single Neotoma publication.

Description

A publication is liked to an individual Neotoma dataset object They are grouped using an S4 publications class.

Value

object of class publication

Examples

{
simon <- new("contact", familyname = "Goring", givennames = "Simon J.")
socorro <- new("contact", familyname = "Dominguez", givennames = "Socorro")
first_author <- new("author", author = simon, order = 1)
second_author <- new("author", author = socorro, order = 2)
author_list <- new("authors", authors = list(first_author, second_author))
pub <- new("publication",
           articletitle = "Top or bottom: Best toast spreading surfaces.",
           journal = "Peanut Butter Science",
           year = "2022",
           volume = "2",
           author = author_list)
           }

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.

Description

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.

Value

object of class publications


S4 class for repositories information

Description

The grouped class for repositories from the Neotoma Paleoecology Database.

Value

object of class repositories


S4 class for repository information

Description

The standard object class for repository from the Neotoma Paleoecology Database.

Value

object of class repository


S4 class for dataset information

Description

The standard object class for samples from the Neotoma Paleoecology Database.

Value

object of class sample


Obtain samples from a record or multiple records.

Description

Obtain samples from a record or multiple records.

Usage

samples(x)

Arguments

x

sites object

Value

data.frame with record information at sample level


samples

Description

Obtain elements from collunit

Usage

## S4 method for signature 'collunit'
samples(x)

Arguments

x

collunit object

Value

data.frame with sample records


Get samples from a collectionunit or set of collection units:

Description

Obtain elements from collunits

Usage

## S4 method for signature 'collunits'
samples(x)

Arguments

x

collunits object

Value

data.frame with sample records


samples

Description

Obtain elements on the samples level

Usage

## S4 method for signature 'site'
samples(x)

Arguments

x

site object

Value

data.frame with sample records

Examples


marion <- get_sites(sitename = "Marion Lake") %>%
  get_datasets() %>%
  filter(datasettype == "pollen") %>%
  get_downloads()
pollen <- samples(marion)


samples

Description

Obtain all samples within a sites object

Usage

## S4 method for signature 'sites'
samples(x)

Arguments

x

sites object

Value

data.frame with sample records

Examples

{
dw <- get_downloads(1)
pollen <- samples(dw)
}

S4 class for the set of samples

Description

The grouped class for samples from the Neotoma Paleoecology Database.

Value

object of class samples


Select the best match for an object.

Description

Select the best match for an object.

Usage

selectMatch(x, n)

Arguments

x

object

n

n elements that are a best match

Value

attr Select the match between a local record and a Neotoma match


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

Description

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

Usage

## S4 method for signature 'publication,logical'
selectMatch(x, n)

Arguments

x

A publication object

n

The match number (in the case an NA is returned).

Value

the best match to the selected publication.


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

Description

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

Usage

## S4 method for signature 'publication,numeric'
selectMatch(x, n)

Arguments

x

A publication object

n

The match number.

Value

the best match to the selected publication.


set chronology information for a new record.

Description

Create a new chronology for a record. Within Neotoma all chronologies have unique numeric identifiers. Within R, because of the need to use the identifiers across objects, and because we want to avoid conflicts between naming systems, a universally unique identifier (UUID) is created for the object ID.

Function to create new chronology objects for personal analysis. The new object will not be uploaded to the database.

Usage

set_chronology(
  x = NA,
  chronologyid = NA_integer_,
  notes = NA_character_,
  contact = list(),
  agemodel = NA_character_,
  ageboundolder = NA_integer_,
  ageboundyounger = NA_integer_,
  isdefault = NA_integer_,
  dateprepared = as.Date(character(0)),
  modelagetype = NA_character_,
  chronologyname = NA_character_,
  chroncontrols = data.frame(0)
)

Arguments

x

Object to be set as a chronology

chronologyid

An optional value. Will be assigned a unique identifier if not provided.

notes

Additional notes about the chronology. For more modern models, often the function call to Bacon or Bchron is added here.

contact

A contacts object, identifying the individual(s) who created the chronology

agemodel

A string representing the age model name, for example "Crummy linear interpolation".

ageboundolder

The ageboundolder is assigned the oldest sample age rounded up to the nearest 10

ageboundyounger

The ageboundyounger is assigned the oldest sample age rounded up to the nearest 10

isdefault

Defines whether the model is the default for the collection unit for a particular model age type.

dateprepared

The date at which the age model was prepared.

modelagetype

The age type for the model. For validation, the models should be one of the valid Neotoma agetypes: https://api.neotomadb.org/v2.0/data/dbtables?table=agetypes

chronologyname

A valid name for the chronology.

chroncontrols

A data.frame containing the chronological controls for the age model.

Value

chronology object


set Site Information for Fossil Sites

Description

Function to create new collection unit objects for personal analysis. The new object will not be uploaded to the database.

Usage

set_collunit(
  x = NA,
  collectionunitid = NA_integer_,
  notes = NA_character_,
  handle = NA_character_,
  colldate = as.Date(character(1)),
  location = NA_character_,
  waterdepth = NA_integer_,
  gpslocation = st_as_sf(st_sfc()),
  collunittype = NA_character_,
  collectiondevice = NA_character_,
  collectionunitname = NA_character_,
  depositionalenvironment = NA_character_,
  datasets = NULL,
  chronologies = NULL,
  defaultchronology = NA_integer_
)

Arguments

x

object to be set as collunit

collectionunitid

collection unit identifier

notes

notes

handle

handle

colldate

collection date

location

location of the collection unit

waterdepth

depth at where the sample is taken

gpslocation

location with GPS

collunittype

type of collection unit

collectiondevice

device used to collect the sample

collectionunitname

name of the collection unit

depositionalenvironment

depositional environment

datasets

datasets that the collection unit has

chronologies

chronologies taken from the collection unit

defaultchronology

best chronology model identifier to be used with this collection unit

Value

collunit object

Examples

{
# Create a collunit
my_collunit <- set_collunit(notes = "my lake")
}

Set contact information for a new record.

Description

Create a new contact for a record. Within Neotoma all chronologies have unique numeric identifiers. Within R, because of the need to use the indentifiers across objects, and because we want to avoid conflicts between naming systems, a universally unique identifier (UUID) is created for the object ID.This is not to be updated to the database.

Usage

set_contact(
  x = NA,
  contactid = NA_integer_,
  familyname = NA_character_,
  leadinginitials = NA_character_,
  givennames = NA_character_,
  suffix = NA_character_,
  ORCID = NA_character_,
  title = NA_character_,
  institution = NA_character_,
  email = NA_character_,
  phone = NA_character_,
  contactstatus = NA_character_,
  fax = NA_character_,
  url = NA_character_,
  address = NA_character_,
  notes = NA_character_
)

Arguments

x

Object to be set as a contact

contactid

An arbitrary Contact identification number.

familyname

Family or surname name of a person.

leadinginitials

Leading initials for given or forenames without spaces (e.g. G.G.).

givennames

Given or forenames of a person (e.g. George Gaylord). Initials with spaces are used if full given names are not known (e.g. G. G).

suffix

Suffix of a person’s name (e.g. Jr., III).

ORCID

A unique ORCID (see https://orcid.org).

title

A person’s title (e.g. Dr., Prof., Prof. Dr).

institution

The institution where an individual works.

email

An individuals email address

phone

Their phone number

contactstatus

Are they "active" or "retired"?

fax

Do people still use fax machines?

url

Their homepage

address

A physical address

notes

Notes about the individual

Value

contact object


set Site Information for Fossil Sites

Description

Function to create new dataset objects for personal analysis. The new object will not be uploaded to the database.

Usage

set_dataset(
  x = NA,
  datasetid = NA_integer_,
  datasetname = NA_character_,
  database = NA_character_,
  doi = NA,
  datasettype = NA_character_,
  age_range_old = NA_integer_,
  age_range_young = NA_integer_,
  age_units = NA_character_,
  notes = NA_character_,
  pi_list = NA,
  samples = NULL,
  specimens = NULL
)

Arguments

x

object to be set as dataset,

datasetid

dataset identifier

datasetname

name of the dataset

database

dataset where the dataset came from

doi

DOI

datasettype

type the dataset belongs to

age_range_old

age range old

age_range_young

age range young

age_units

age units

notes

notes

pi_list

pi list

samples

taxa objects

specimens

specimens slot

Value

dataset object

Examples

{
# Create a dataset
my_dataset <- set_dataset(database = "EPD",
                    datasettype = "pollen",
                    notes = "my lake")
}

Set the default chronology within a collectionunit.

Description

Set the default chronology within a collectionunit.

Usage

set_default(x, n)

Arguments

x

A chronologies object.

n

The particular chronology to be used as the default.

Value

sites object with new default chronology


Change the default age model for a record.

Description

Change the default age model for a record.

Usage

## S4 method for signature 'chronologies'
set_default(x, n)

Arguments

x

A chronologies object.

n

The particular chronology to be used as the default.

Value

chronologies object with a new defaulted chronology


Create a new publication (or publication set)

Description

A function to create new publication objects by hand.

Usage

set_publications(
  publicationid = NA_integer_,
  publicationtypeid = NA_integer_,
  publicationtype = NA_character_,
  year = NA_character_,
  citation = NA_character_,
  articletitle = NA_character_,
  journal = NA_character_,
  volume = NA_character_,
  issue = NA_character_,
  pages = NA_character_,
  citationnumber = NA_character_,
  doi = NA_character_,
  booktitle = NA_character_,
  numvolumes = NA_character_,
  edition = NA_character_,
  volumetitle = NA_character_,
  seriestitle = NA_character_,
  seriesvolume = NA_character_,
  publisher = NA_character_,
  url = NA_character_,
  city = NA_character_,
  state = NA_character_,
  country = NA_character_,
  originallanguage = NA_character_,
  notes = NA_character_,
  author = NULL
)

Arguments

publicationid

ID of publication

publicationtypeid

ID of kind of publication

publicationtype

A text string identifying the publication type within the Neotoma database.

year

The year of publication.

citation

A full text citation for the article.

articletitle

The title of the article.

journal

The journal in which the article was published.

volume

The journal volume.

issue

The journal issue.

pages

The pages of the journal.

citationnumber

How many times has the paper been cited?

doi

A DOI for the record.

booktitle

The title of the book (if the publication is a book)

numvolumes

The number of book volumes (if a series)

edition

The book edition.

volumetitle

The title of the volume (in a published series)

seriestitle

The title of the series.

seriesvolume

The series volume.

publisher

The publisher.

url

Publication URL

city

City of publication.

state

State of publication.

country

Country of publication.

originallanguage

Original language of publication.

notes

Publication notes.

author

name of the author of publication.

Value

publication object


set Sample Information

Description

Function to create new samples objects for analysis. The new object will not be uploaded to the database.

Usage

set_sample(
  x = NA,
  ages = list(),
  igsn = NA_character_,
  datum = data.frame(),
  depth = NA_integer_,
  sampleid = NA_integer_,
  thickness = NA_integer_,
  samplename = NA_character_,
  sampleanalyst = list(),
  analysisunitid = NA_integer_,
  analysisunitname = NA_character_
)

Arguments

x

Object to be set as a sample

ages

ages

igsn

IGSN character

datum

dataframe of datum

depth

integer representing depth

sampleid

ID for sample

thickness

thickness of core

samplename

sample's name

sampleanalyst

Analyst's contact name

analysisunitid

Which analysis unit it is

analysisunitname

Analysis Unit's name

Value

sample object

Examples

{
# Set an empty sample
my_sample <- set_sample()
}

Set Neotoma API Source or Server

Description

Choose to pull Neotoma data from the main Neotoma server, the development server or from a local instance of the API.

Usage

set_server(server = "neotoma")

Arguments

server

One of local (when the API is running locally on port 3005), neotoma or dev.

Value

NULL modifies how to talk to the API (local, dev, server)

Examples


# The user is running the API locally using the node/express API
# cloned from github: https://github.com/NeotomaDB/api_nodetest
set_server(server = "local")
# The user switches back to the remote api server.
set_server(server = "neotoma")


set Site Information for Fossil Sites

Description

set Site Information for Fossil Sites

Usage

set_site(
  x = NA,
  siteid = NA_integer_,
  sitename = NA_character_,
  geography = st_as_sf(st_sfc()),
  altitude = NA_integer_,
  geopolitical = list(),
  area = NA_integer_,
  notes = NA_character_,
  description = NA_character_,
  collunits = NULL
)

Arguments

x

Object to be set as a site

siteid

The unique site id for a site. If this site is new to Neotoma then leave the ID as NA (the default).

sitename

Actual site name as a character string.

geography

An sf object representing the site location, either as a polygon or point.

altitude

altitude/elevation of the site.

geopolitical

The geopolitical unit in which the site is located.

area

The area of the site or depositional basin in ha. Can be calculated from the polygon.

notes

additional information of the site

description

Function to create new site objects for personal analysis. The new object will not be uploaded to the database.

collunits

Collection units in the site

Value

site object

Examples

{
# Create a site called "My Lake", to
x = sf::st_as_sf(sf::st_sfc(sf::st_point(c(5,5))))
my_site <- set_site(sitename = "My Lake",
                    geography = x,
                    description = "my lake",
                    altitude = 30)
}

Show the collection unit information

Description

Show the collection unit information

Usage

## S4 method for signature 'collunit'
show(object)

Arguments

object

collunit object

Value

null used for side effects. Printing a data.frame


Show the collection unit information

Description

Show the collection unit information

Usage

## S4 method for signature 'collunits'
show(object)

Arguments

object

collunits object

Value

null used for side effects. Printing a data.frame


Show contact object

Description

Show contact object

Show a contact object

Usage

## S4 method for signature 'contact'
show(object)

## S4 method for signature 'contact'
show(object)

Arguments

object

a contact object

Value

null - side effect for printing contact object

Null - prints a data.frame


Show a contacts object.

Description

Show a contacts object.

Usage

## S4 method for signature 'contacts'
show(object)

Arguments

object

A contacts object.

Value

null - side effect for printing contacts object


Show Dataset Method

Description

Show Dataset Method

Usage

## S4 method for signature 'dataset'
show(object)

Arguments

object

dataset object

Value

null - side effect, prints a data.frame with dataset metadata


Show Datasets object as a dataframe

Description

Show Datasets object as a dataframe

Usage

## S4 method for signature 'datasets'
show(object)

Arguments

object

datasets object

Value

null - side effect, prints a data.frame with datasets metadata


Print publications to screen.

Description

Print publications to screen.

Usage

## S4 method for signature 'publication'
show(object)

Arguments

object

A publication object.

Value

NULL - side effect function of printing a data.frame


Show the contents of a publication object.

Description

Show the contents of a publication object.

Usage

## S4 method for signature 'publications'
show(object)

Arguments

object

A publications object

Value

NULL - side effect function of printing a data.frame


Show a site object as a dataframe

Description

Convert a Neotoma package site object into a data.frame() returning the siteid, sitename, latitude, longitude and altitude of the site.

Usage

## S4 method for signature 'site'
show(object)

Arguments

object

site object

Value

NULL - side effect for printing a data.frame object


Show sites objects as a dataframe

Description

Return a set of site objects as a single data.frame().

Usage

## S4 method for signature 'sites'
show(object)

Arguments

object

sites object

Value

NULL - side effect for printing a data.frame object


Show Taxa Method

Description

Show Taxa Method

Usage

## S4 method for signature 'taxa'
show(object)

Arguments

object

taxon object

Value

null - side effect, prints a data.frame with taxon metadata


Show Taxon Method

Description

Show Taxon Method

Usage

## S4 method for signature 'taxon'
show(object)

Arguments

object

taxon object

Value

null - side effect, prints a data.frame with taxon metadata


Show matches for objects.

Description

Show matches for objects.

Usage

showMatch(x)

Arguments

x

object to show matches for

Value

data.frame that marks if a site exists in another sites object


Show matched publication objects.

Description

Show matched publication objects.

Usage

## S4 method for signature 'publication'
showMatch(x)

Arguments

x

A publication object.

Value

NULL printed matches with other publications


An S4 class for site information

Description

The standard object class for sites from the Neotoma Paleoecology Database.

Value

object of class site


An S4 class for multi-site information

Description

The standard object class for multi-sites from the Neotoma Paleoecology Database.from @returns object of class sites


S4 class for specimen information

Description

The standard object class for specimen from the Neotoma Paleoecology Database.

Value

object of class specimen


S4 class for specimens information

Description

The grouped class for specimens from the Neotoma Paleoecology Database.

Value

object of class specimens


Summary of objects within a sites object.

Description

This function summarizes a sites object, from site level and returns a data.frame that contains the site ID, sitename, collectionunit ID, count of chronologies, count of datasets and types of datasets within the site.

Usage

## S4 method for signature 'sites'
summary(object, ...)

Arguments

object

sites object

...

additional properties passed to summary

Value

data.frame object with site summary information


taxa

Description

Show the samples table

Usage

taxa(object)

Arguments

object

Sites object to extract taxa table from

Value

data.frame with taxa records


Extract taxonomic data from a set of sites.

Description

Extract taxonomic data from a set of sites.

Usage

## S4 method for signature 'collunit'
taxa(object)

Arguments

object

A collunit object.

Value

A data.frame reporting the taxa/data objects, units, elements and other features within a set of records.


Extract taxonomic data from a set of sites.

Description

Extract taxonomic data from a set of sites.

Usage

## S4 method for signature 'collunits'
taxa(object)

Arguments

object

A collunits object.

Value

A data.frame reporting the taxa/data objects, units, elements and other features within a set of records.


Extract taxonomic data from a single site.

Description

Extract taxonomic data from a single site.

Usage

## S4 method for signature 'site'
taxa(object)

Arguments

object

A site object.

Value

A data.frame reporting the taxa/data objects, units, elements and other features within a set of records.

Examples


somesites <- get_sites(datasettype = "pollen", limit = 3) %>%
  get_downloads()
diatomtaxa <- taxa(somesites[[1]])


Extract taxonomic data from a set of sites.

Description

From a sites object,

Usage

## S4 method for signature 'sites'
taxa(object)

Arguments

object

A sites object.

Value

A data.frame reporting the taxa/data objects, units, elements and other features within a set of records.

Examples


somesites <- get_sites(datasettype = "diatom", limit = 3) %>%
  get_downloads()
diatomtaxa <- taxa(somesites)
common_taxa <- diatomtaxa %>%
  dplyr::filter(sites == 3)
  


S4 class for taxa information

Description

Taxa class for taxa information from the Neotoma Paleoecology Database.

Value

object of class taxon


S4 class for specimen information

Description

Taxon class for single taxon information from the Neotoma Paleoecology Database.

Value

object of class taxon


toWide

Description

Obtain a wide table with information regarding of samples grouped by variablename and depth/age.

Usage

toWide(
  x,
  variablenames = c(),
  ecologicalgroups = c(),
  elementtypes = c(),
  unit = c(),
  groupby = "age",
  operation = "prop"
)

Arguments

x

dataframe object with samples

variablenames

Optional vector to filter by specific variable names.

ecologicalgroups

Vector stating the ecological groups to be filtered by, e.g "DIAT", "TRSH"

elementtypes

Label of element type to filter by, e.g. "pollen", "valve"

unit

Label stating which units to filter by, e.g. "NISP"

groupby

Group by 'age' or 'depth'

operation

label or vector of operations to be chosen from: 'prop', 'sum', 'presence'.

Value

wide data.frame obtained from long samples data.frame

Examples


fourcorners <- '{"type": "Polygon",
"coordinates": [[
[-109.36060497194846, 37.69552879956651],
[-107.813845732192, 37.69552879956651],
[-107.813845732192, 36.80303716260222],
[-109.36060497194846, 36.80303716260222], 
[-109.36060497194846, 37.69552879956651]
]]}'

# Download all vertebrate localities within a bounding box.
fc_sites <- neotoma2::get_sites(loc = fourcorners[1])
fc_ds <- neotoma2::get_datasets(fc_sites) %>% 
neotoma2::filter(datasettype=="vertebrate fauna")

fc_dl <- neotoma2::get_downloads(fc_ds)
fc_dl1 <- fc_dl[[1]]

fc_smp <- samples(fc_dl1)
toWide(fc_smp, ecologicalgroups=c('AVES', 'RODE'), 
elementtypes='bone/tooth', unit='present/absent')



write CSV

Description

write CSV

Usage

## S4 method for signature 'chronologies'
write.csv(x, ...)

Arguments

x

chronologies object

...

Additional parameters associated with the call.

Value

null, called for side effects


write CSV

Description

write CSV

Usage

## S4 method for signature 'collunits'
write.csv(x, ...)

Arguments

x

collunits object

...

Additional parameters associated with the call.

Value

null side effect for saving a CSV file.


write CSV

Description

write CSV

Usage

## S4 method for signature 'datasets'
write.csv(x, ...)

Arguments

x

datasets object

...

Additional parameters associated with the call.

Value

null -side effect for printing a CSV file


write CSV

Description

write CSV

Usage

## S4 method for signature 'sites'
write.csv(x, ...)

Arguments

x

A sites object

...

Other options to pass to write.csv().

Value

NULL side effect from saving a csv file


write CSV

Description

write CSV

Usage

## S4 method for signature 'taxa'
write.csv(x, ...)

Arguments

x

taxa object

...

Additional parameters associated with the call.

Value

null -side effect for printing a CSV file