getids: Get object IDs

View source: R/getids.r

getidsR Documentation

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)

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

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

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

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

Arguments

x

A Neotoma2 sites or collunits object.

order

sort items by siteid, collunitid, datasetid

Value

data.frame containing siteid, datasetid, and collunitid

Author(s)

Simon Goring goring@wisc.edu

Examples


tryCatch({
marion <- get_sites(sitename = "Marion Lake")
collunitids <- getids(collunits(marion))
}, error = function(e) {
 message("Neotoma server not responding. Try again later.")
})


neotoma2 documentation built on Dec. 6, 2025, 5:07 p.m.