Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
Package: neotoma2
Title: Working with the Neotoma Paleoecology Database
Date: 2025-12-12
Version: 1.0.11
Date: 2026-04-23
Version: 1.0.12
Authors@R:
c(person(given = "Dominguez Vidana",
family = "Socorro",
Comment on lines 6 to 7
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Authors@R, the first author’s given/family names appear swapped (given = "Dominguez Vidana", family = "Socorro"). Other project metadata (e.g., CITATION.cff) lists given-names: Socorro and family-names: Dominguez Vidana, so DESCRIPTION likely should match to ensure correct author display on CRAN.

Suggested change
c(person(given = "Dominguez Vidana",
family = "Socorro",
c(person(given = "Socorro",
family = "Dominguez Vidana",

Copilot uses AI. Check for mistakes.
role = c("aut", "cre"),
email = "dominguezvid@wisc.edu",
comment = structure("0000-0002-7926-4935", .Names = "ORCID")),
comment = c(ORCID="0000-0002-7926-4935")),
person(given = "Simon",
family = "Goring",
role = c("aut"),
email = "goring@wisc.edu",
comment = structure("0000-0002-2700-4605", .Names = "ORCID")))
comment = c(ORCID="0000-0002-2700-4605")))
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/>.
Examples in functions that require API access are not executed during CRAN checks.
Vignettes do not execute as to avoid API calls during CRAN checks.
Comment on lines 18 to +21
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The added DESCRIPTION text focuses on CRAN-check behavior (and includes multiple long lines). CRAN may flag non-functional/administrative content in the package Description and/or lines >80 characters. Consider keeping Description focused on what the package does, moving CRAN-check specifics to cran-comments/README, and reflowing Description lines to stay within recommended width.

Suggested change
Description: Access and manipulation of data using the Neotoma Paleoecology Database.
<https://api.neotomadb.org/api-docs/>.
Examples in functions that require API access are not executed during CRAN checks.
Vignettes do not execute as to avoid API calls during CRAN checks.
Description: Access and manipulate data from the Neotoma Paleoecology
Database. See <https://api.neotomadb.org/api-docs/>.

Copilot uses AI. Check for mistakes.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Expand Down
10 changes: 9 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# News neotoma2 R package

## neotoma2 1.0.12
Updated description file to match CRAN's comments.
Now follows:
comment = c(ORCID = .......)


## neotoma2 1.0.11

Added flag error=True to all vignette codechunks to not run when API is down in case API comes down in between a knitting.
Set examples to \dontrun{} to avoid violating CRAN's policy that allows access to internet.
Set vignettes to `eval=FALSE` as to avoid calling APIs that require access to internet.
Set all tests that require API call to `skip on CRAN`.

## neotoma2 1.0.10

Expand Down
3 changes: 2 additions & 1 deletion R/01_classDefinitions.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ setClassUnion("id", c("character", "integer", "numeric"))
#' @name contacts_classes
#' @description An unordered list of individual S4 `contact` objects.
#' @export
#' @examples
#' @examples {
#' new("contact", familyname = "Goring", givennames = "Simon J.")
#' }
#' @returns object of class `contact`
#' @aliases contact-class
#' @md
Expand Down
2 changes: 1 addition & 1 deletion R/clean.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#' * After: \{site: 1, dataset: \[1, 2\]\}
#' So the site is gathered, and the datasets are now part of an
#' array of datasets.
#' @examples \donttest{
#' @examples \dontrun{
#' tryCatch({
#' alex <- get_sites(sitename = "Alex%")
#' alex2 <- get_sites(24)
Expand Down
2 changes: 1 addition & 1 deletion R/filter.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#' @param .by (only used for filtering `data.frame` objects)
#' @param .preserve (only used for filtering `data.frame` objects)
#' @returns filtered `sites` object
#' @examples \donttest{
#' @examples \dontrun{
#' # Download 10 sites, but only keep the sites that are close to sea level.
#' tryCatch({
#' some_sites <- get_sites(sitename = "Lake%", limit = 3)
Expand Down
2 changes: 1 addition & 1 deletion R/get_datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#' record.
#' * `all_data` The API only downloads the first 25 records of the query.
#' For the complete records, use `all_data=TRUE`
#' @examples \donttest{
#' @examples \dontrun{
#' tryCatch({
#' random_sites <- get_sites(1)
#' allds <- get_datasets(random_sites, limit=3)
Expand Down
2 changes: 1 addition & 1 deletion R/get_documentation.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' @importFrom utils browseURL
#' @importFrom rlang is_interactive
#' @returns NULL
#' @examples \donttest{
#' @examples \dontrun{
#' if (interactive()) {
#' get_documentation()
#' }
Expand Down
2 changes: 1 addition & 1 deletion R/get_downloads.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#' \item{ \code{pi list} }{P.I. info}
#' \item{ \code{analyst} }{analyst info}
#' \item{ \code{metadata} }{dataset metadata}
#' @examples \donttest{
#' @examples \dontrun{
#' # To find the downloads object of dataset 24:
#' tryCatch({
#' downloads24 <- get_downloads(24)
Expand Down
2 changes: 1 addition & 1 deletion R/get_manual.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @description Open up the Neotoma manual homepage.
#' @importFrom utils browseURL
#' @importFrom rlang is_interactive
#' @examples {
#' @examples \dontrun{
#' # This call does not work from `source()` calls or in testing.
#' # interactive() just lets us know you are interacting with the console:
#' if (interactive()) {
Expand Down
2 changes: 1 addition & 1 deletion R/get_publications.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' `year` The year the publication was released.
#' `search` A plain text search string used to search the citation.
#' @returns `publications` object
#' @examples \donttest{
#' @examples \dontrun{
#' # How old are the papers in Neotoma that include the term "mammut"?
#' tryCatch({
#' mammoth_papers <- get_publications(search="mammut") %>%
Expand Down
31 changes: 4 additions & 27 deletions R/get_sites.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,42 +62,19 @@
#' * `loc` An `sf` object that describes site's location.
#' * `description`
#' * `collunits` limited information on collunits
#' @examples
#' \donttest{
#' @examples \dontrun{
#' ## Find sites with a min altitude of 12m and a max altitude of 25m
#' tryCatch({
#' sites_12to25 <- get_sites(altmin=12, altmax=25)
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#' ## Return all sites, using a minimum altitude of 2500m (returns >500 sites):
#' tryCatch({
#' sites_2500 <- get_sites(altmin=2500, all_data = TRUE)
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#' ## To find sites in Brazil
#' sites_12to25 <- get_sites(altmin=12, altmax=25)
#' 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]]]}'
#' tryCatch({
#' 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))
#' }
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#' }
#' @md
#' @export
Expand Down
8 changes: 2 additions & 6 deletions R/get_speleothems.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,9 @@ speleo_helper <- function(sites) {
#' * `x` The unique dataset ID (integer) in Neotoma. Can be passed as a
#' vector of dataset IDs.
#' * `sites` A `sites` R object.
#' @examples {
#' @examples \dontrun{
#' ## Find speleothems by numeric datasetid:
#' tryCatch({
#' speleo <- get_speleothems(c(2,5))
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#' speleo <- get_speleothems(c(2,5))
#' }
#' @md
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/get_stats.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' added per month), and \code{dstypemonth} (the number of datasets added
#' per dataset type per month). Default is \code{dsdbmonth}.
#' @returns `data.frame` with summary statistics
#' @examples \donttest{
#' @examples \dontrun{
#' tryCatch({
#' last_month <- get_stats(start = 0, end = 1, type = "dsdbmonth")
#' }, error = function(e) {
Expand Down
6 changes: 1 addition & 5 deletions R/get_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@
#' @param limit Default 25 records
#' @param offset Default 0.
#' @returns selected `table` values from the Database.
#' @examples {
#' @examples \dontrun{
#' # Returns only the first 25 specimen records.
#' tryCatch({
#' someSpec <- get_table('specimens')
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#' }
#' @importFrom dplyr bind_rows
#' @importFrom purrr map
Expand Down
6 changes: 1 addition & 5 deletions R/getids.r
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@
#' @param x A Neotoma2 \code{sites} or \code{collunits} object.
#' @param order sort items by `siteid`, `collunitid`, `datasetid`
#' @returns `data.frame` containing `siteid`, `datasetid`, and `collunitid`
#' @examples \donttest{
#' tryCatch({
#' @examples \dontrun{
#' marion <- get_sites(sitename = "Marion Lake")
#' collunitids <- getids(collunits(marion))
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#' }
#' @md
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/pingNeotoma.r
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' numeric port), \code{neotoma} or \code{dev}.
#' @returns A valid HTTP status code or returns an error if a connection
#' is refused.
#' @examples {
#' @examples \dontrun{
#' test_connection <- pingNeotoma("neotoma")
#' }
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/plotLeaflet.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' @importFrom leaflet leaflet addTiles addCircleMarkers
#' @importFrom leaflet markerOptions markerClusterOptions
#' @param object Sites object to plot
#' @examples \donttest{
#' @examples \dontrun{
#' # Note that by default the limit for queries is 25 records:
#' tryCatch({
#' modernSites <- get_sites(keyword = "Modern")
Expand Down
7 changes: 2 additions & 5 deletions R/samples.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
#' @author Simon Goring \email{goring@wisc.edu}
#' @param x sites object
#' @description Obtain all samples within a sites object
#' @examples {
#' tryCatch({
#' @examples \dontrun{
#' # Get full data download from API and create a long table with samples data.
#' dw <- get_downloads(1)
#' pollen <- samples(dw)
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#' }
#' @importFrom dplyr bind_rows left_join rename mutate
#' @importFrom purrr map
Expand Down
2 changes: 1 addition & 1 deletion R/set_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @importFrom assertthat assert_that
#' @param server One of \code{local} (when the API is running locally on
#' port 3005), \code{neotoma} or \code{dev}.
#' @examples \donttest{
#' @examples \dontrun{
#' # 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")
Expand Down
25 changes: 7 additions & 18 deletions R/site-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,9 @@ setMethod(f = "show",
#' @description Obtain one of the elements within a `sites`,
#' `collectionunits`, `datasets`, etc... Neotoma objects.
#' @returns sliced `site` object
#' @examples \donttest{
#' tryCatch({
#' some_site <- get_sites(sitename = "Site%", limit=3)
#' some_site[[2]]
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#' @examples \dontrun{
#' some_site <- get_sites(sitename = "Site%", limit=3)
#' some_site[[2]]
#' }
#' @aliases [[,sites,numeric-method
#' @exportMethod [[
Expand Down Expand Up @@ -407,13 +403,10 @@ setMethod(f = "summary",
#' @importFrom dplyr bind_rows full_join select arrange filter
#' @importFrom dplyr mutate group_by row_number
#' @returns `data.frame` object with DOIs information.
#' @examples {
#' tryCatch({
#' @examples \dontrun{
#' # Get datasets metadata from API and retrieve DOIs
#' ds <- get_datasets(1)
#' doi(ds)
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#' }
#' @aliases doi,sites-method
#' @exportMethod doi
Expand Down Expand Up @@ -460,13 +453,9 @@ setMethod(f = "doi",
#' @importFrom purrr map
#' @importFrom dplyr bind_rows full_join select arrange filter
#' @returns `data.frame` object with citation information.
#' @examples {
#' tryCatch({
#' @examples \dontrun{
#' # Get datasets metadata from API
#' ds <- get_datasets(1)
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cite_data roxygen example no longer demonstrates the function being documented (it only assigns ds <- get_datasets(1) and then stops). Add a call to cite_data(ds) (or an equivalent minimal usage) so the generated Rd example remains meaningful, even when wrapped in \dontrun{}.

Suggested change
#' ds <- get_datasets(1)
#' ds <- get_datasets(1)
#' cite_data(ds)

Copilot uses AI. Check for mistakes.
#' cite_data(ds)
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#' }
#' @aliases cite_data,sites-method
#' @exportMethod cite_data
Expand Down
6 changes: 1 addition & 5 deletions R/speleothemdetails.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@
#' @returns `data.frame` with speleothem records
#' @description Obtain elements on the speleothems level
#' Experimental function: API and behavior may change.
#' @examples \donttest{
#' tryCatch({
#' @examples \dontrun{
#' kesang <- get_sites(sitename = "Kesang cave") %>%
#' get_datasets() %>%
#' filter(datasettype == "pollen") %>%
#' get_speleothems()
#' sp <- speleothemdetails(kesang)
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#' }
#' @md
#' @export
Expand Down
6 changes: 1 addition & 5 deletions R/speleothems.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
#' @returns `data.frame` with sample records
#' @description Obtain all speleothems within a sites object
#' Experimental function: API and behavior may change.
#' @examples {
#' tryCatch({
#' @examples \dontrun{
#' ds <- get_datasets(37302)
#' sp <- speleothems(ds)
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#' }
#' @md
#' @export
Expand Down
8 changes: 2 additions & 6 deletions R/taxa.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@
#' @returns A \code{data.frame} reporting the taxa/data objects, units,
#' elements and other features within a set of records.
#' @description Extract taxonomic data from a set of sites.
#' @examples \donttest{
#' tryCatch({
#' @examples \dontrun{
#' somesites <- get_sites(datasettype = "diatom") %>%
#' get_downloads()
#' diatomtaxa <- taxa(somesites)
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#' }
#' }
#' @md
#' @export
setMethod(f = "taxa",
Expand Down
9 changes: 2 additions & 7 deletions R/toWide.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,15 @@
#' @param operation label or vector of operations to be chosen from:
#' 'prop', 'sum', 'presence'.
#' @returns wide `data.frame` obtained from long `samples` `data.frame`
#' @examples
#' \donttest{
#' tryCatch({
#' @examples \dontrun{
#' fc_sites <- neotoma2::get_datasets(limit=5, datasettype = "vertebrate fauna")
#' fc_ds <- fc_sites %>%
#' neotoma2::get_downloads()
#' fc_dl1 <- fc_dl[[1]]
#' fc_smp <- samples(fc_dl1)
#' toWide(fc_smp, ecologicalgroups=c('AVES', 'RODE'),
#' elementtypes='bone/tooth', unit='present/absent')
#' }, error = function(e) {
#' message("Neotoma server not responding. Try again later.")
#' })
#'}
#' }
#' @description Obtain a wide table with information regarding of
#' samples grouped by variablename and depth/age.
#' @export
Expand Down
Loading
Loading