From cbbbf10496dce0edff4cb28d5dcfb815abd7a991 Mon Sep 17 00:00:00 2001 From: Socorro Dominguez Date: Tue, 27 Feb 2024 12:49:57 -0800 Subject: [PATCH] Updated package --- DESCRIPTION | 4 +- R/filter.R | 136 +++++++++++++++++++-------------------- R/get_sites.R | 80 +++++++++++------------ man/filter.Rd | 66 +++++++++---------- man/filter.sites.Rd | 66 +++++++++---------- man/get_sites.Rd | 56 ++++++++-------- man/get_sites.default.Rd | 6 +- man/get_sites.sites.Rd | 4 +- 8 files changed, 202 insertions(+), 216 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7233b3e..ff1396a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: neotoma2 Title: Working with the Neotoma Paleoecology Database -Date: 2024-02-16 +Date: 2024-02-27 Version: 1.0.3 Authors@R: c(person(given = "Dominguez Vidana", @@ -48,4 +48,4 @@ Imports: wk, uuid, tidyr -VignetteBuilder: knitr +VignetteBuilder: knitr \ No newline at end of file diff --git a/R/filter.R b/R/filter.R index 4c064ce..6989b1e 100644 --- a/R/filter.R +++ b/R/filter.R @@ -5,42 +5,40 @@ utils::globalVariables(c("elev", "notes")) #' 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: -#' \itemize{ -#' \item{"siteid"}{A numeric site identifier from the Neotoma Database} -#' \item{"sitename"}{The character string sitename.} -#' \item{"lat"}{A numeric latitude value.} -#' \item{"long"}{A numeric longitude value.} -#' \item{"altitude"}{The elevation of the site. Note that some sites do not +#' * `siteid` A numeric site identifier from the Neotoma Database. +#' * `sitename` The character string sitename. +#' * `lat` A numeric latitude value. +#' * `long` A numeric longitude value. +#' * `altitude` The elevation of the site. Note that some sites do not #' include elevation information. For these an NA value appears, and they -#' would be removed when using an elevation filter.} -#' \item{"datasetid"}{A numeric datasetid from Neotoma.} -#' \item{"database"}{A character string naming the constituent database -#' from which the dataset is drawn.} -#' \item{"datasettype"}{A character string representing one of the many -#' dataset types within Neotoma.} -#' \item{"age_range_old"}{A dataset-level parameter indicating the oldest -#' date covered by the dataset chronology.} -#' \item{"age_range_young"}{A dataset-level parameter indicating the youngest -#' date covered by the dataset chronology.} -#' \item{"notes"}{Free-form dataset notes provided by the dataset PI(s), -#' analysts or data stewards.} -#' \item{"collectionunitid"}{A numeric collection unit identifier from -#' Neotoma.} -#' \item{"handle"}{A character string identifying the collection unit. These -#' are often shorter form names (originally a default 8 character length).} -#' \item{"collectionunitname"}{A character string identifying the collection -#' unit name.} -#' \item{"colldate"}{The date on which the collection unit was sampled. Many -#' of these are empty.} -#' \item{"location"}{A free-form character string indicating the location of -#' the collection unit within the site.} -#' \item{"waterdepth"}{A numeric depth at which the core was obtained.} -#' \item{"collunittype"}{A character string for the collection unit type.} -#' \item{"collectiondevice"}{A fixed vocabulary term for the collection -#' device.} -#' \item{"depositionalenvironment"}{A fixed vocabulary name for the -#' depositional environment.} -#'} +#' would be removed when using an elevation filter. +#' * `datasetid` A numeric datasetid from Neotoma. +#' * `database` A character string naming the constituent database +#' from which the dataset is drawn. +#' * `datasettype` A character string representing one of the many +#' dataset types within Neotoma. +#' * `age_range_old` A dataset-level parameter indicating the oldest +#' date covered by the dataset chronology. +#' * `age_range_young` A dataset-level parameter indicating the youngest +#' date covered by the dataset chronology. +#' * `notes` Free-form dataset notes provided by the dataset PI(s), +#' analysts or data stewards. +#' * `collectionunitid` A numeric collection unit identifier from +#' Neotoma. +#' * `handle` A character string identifying the collection unit. These +#' are often shorter form names (originally a default 8 character length). +#' * `collectionunitname` A character string identifying the collection +#' unit name. +#' * `colldate` The date on which the collection unit was sampled. Many +#' of these are empty. +#' * `location` A free-form character string indicating the location of +#' the collection unit within the site. +#' * `waterdepth` A numeric depth at which the core was obtained. +#' * `collunittype` A character string for the collection unit type. +#' * `collectiondevice` A fixed vocabulary term for the collection +#' device. +#' * `depositionalenvironment` A fixed vocabulary name for the +#' depositional environment. #' @import sf #' @import dplyr #' @importFrom purrr map @@ -59,42 +57,40 @@ filter <- function(x, ...) { #' 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: -#' \itemize{ -#' \item{"siteid"}{A numeric site identifier from the Neotoma Database} -#' \item{"sitename"}{The character string sitename.} -#' \item{"lat"}{A numeric latitude value.} -#' \item{"long"}{A numeric longitude value.} -#' \item{"altitude"}{The elevation of the site. Note that some sites do not +#' * `siteid` A numeric site identifier from the Neotoma Database. +#' * `sitename` The character string sitename. +#' * `lat` A numeric latitude value. +#' * `long` A numeric longitude value. +#' * `altitude` The elevation of the site. Note that some sites do not #' include elevation information. For these an NA value appears, and they -#' would be removed when using an elevation filter.} -#' \item{"datasetid"}{A numeric datasetid from Neotoma.} -#' \item{"database"}{A character string naming the constituent database -#' from which the dataset is drawn.} -#' \item{"datasettype"}{A character string representing one of the many -#' dataset types within Neotoma.} -#' \item{"age_range_old"}{A dataset-level parameter indicating the oldest -#' date covered by the dataset chronology.} -#' \item{"age_range_young"}{A dataset-level parameter indicating the youngest -#' date covered by the dataset chronology.} -#' \item{"notes"}{Free-form dataset notes provided by the dataset PI(s), -#' analysts or data stewards.} -#' \item{"collectionunitid"}{A numeric collection unit identifier from -#' Neotoma.} -#' \item{"handle"}{A character string identifying the collection unit. These -#' are often shorter form names (originally a default 8 character length).} -#' \item{"collectionunitname"}{A character string identifying the collection -#' unit name.} -#' \item{"colldate"}{The date on which the collection unit was sampled. Many -#' of these are empty.} -#' \item{"location"}{A free-form character string indicating the location of -#' the collection unit within the site.} -#' \item{"waterdepth"}{A numeric depth at which the core was obtained.} -#' \item{"collunittype"}{A character string for the collection unit type.} -#' \item{"collectiondevice"}{A fixed vocabulary term for the collection -#' device.} -#' \item{"depositionalenvironment"}{A fixed vocabulary name for the -#' depositional environment.} -#' } +#' would be removed when using an elevation filter. +#' * `datasetid` A numeric datasetid from Neotoma. +#' * `database` A character string naming the constituent database +#' from which the dataset is drawn. +#' * `datasettype` A character string representing one of the many +#' dataset types within Neotoma. +#' * `age_range_old` A dataset-level parameter indicating the oldest +#' date covered by the dataset chronology. +#' * `age_range_young` A dataset-level parameter indicating the youngest +#' date covered by the dataset chronology. +#' * `notes` Free-form dataset notes provided by the dataset PI(s), +#' analysts or data stewards. +#' * `collectionunitid` A numeric collection unit identifier from +#' Neotoma. +#' * `handle` A character string identifying the collection unit. These +#' are often shorter form names (originally a default 8 character length). +#' * `collectionunitname` A character string identifying the collection +#' unit name. +#' * `colldate` The date on which the collection unit was sampled. Many +#' of these are empty. +#' * `location` A free-form character string indicating the location of +#' the collection unit within the site. +#' * `waterdepth` A numeric depth at which the core was obtained. +#' * `collunittype` A character string for the collection unit type. +#' * `collectiondevice` A fixed vocabulary term for the collection +#' device. +#' * `depositionalenvironment` A fixed vocabulary name for the +#' depositional environment. #' @import sf #' @import dplyr #' @importFrom purrr map diff --git a/R/get_sites.R b/R/get_sites.R index e8216b0..86a8ade 100644 --- a/R/get_sites.R +++ b/R/get_sites.R @@ -55,40 +55,37 @@ parse_site <- function(result) { #' ([api.neotomadb.org](https://api.neotomadb.org)) call for `sites`. #' The call itself uses a SQL query which accepts any one of the following #' parameters: -#' \itemize{ -#' \item{`siteid`}{The unique site ID (integer) in Neotoma. Can be passed as a -#' vector of site IDs.} -#' \item{sitename}{The site name, or approximate match using the % wildcard.} -#' \item{database}{The constituent database for the record. See -#' `get_table("constituentdatabases")`} -#' \item{altmin}{The minimum altitude range for site elevation (in meters).} -#' \item{altmax}{The maximum altitude range for site elevation (in meters).} -#' \item{datasetid}{The unique dataset ID (integer) in Neotoma. Can be passed -#' as a vector of dataset IDs.} -#' \item{datasettype}{Neotoma contains data for a number of datasettypes. +#' * `siteid` The unique site ID (integer) in Neotoma. Can be passed as a +#' vector of site IDs. +#' * `sitename` The site name, or approximate match using the % wildcard. +#' * `database` The constituent database for the record. See `get_table("constituentdatabases")` +#' * `altmin` The minimum altitude range for site elevation (in meters). +#' * `altmax` The maximum altitude range for site elevation (in meters). +#' * `datasetid` The unique dataset ID (integer) in Neotoma. Can be passed +#' as a vector of dataset IDs. +#' * `datasettype` Neotoma contains data for a number of datasettypes. #' This returns a subset of data types. For a complete list of available -#' datasettypes, run `neotoma2::get_table('datasettypes')`} -#' \item{doi}{The dataset DOI for a dataset contained within a site. Can be -#' passed as a vector of DOIs.} -#' \item{gpid}{The geopolitical name or identifier containing a site. Can be -#' passed as a vector of names.} -#' \item{keywords}{Keywords for samples within a set of sites. For example -#' "modern" indicates a sample within the record uses the keyword "modern".} -#' \item{contacts}{Contact names or IDs associated with a site.} -#' \item{ageyoung}{A minimum spanning age for the record, in years before -#' radiocarbon present (1950).} -#' \item{ageold}{A maximum spanning age for the record, in years before -#' radiocarbon present (1950).} -#' \item{ageof}{An age which must be contained within the range of sample ages -#' for a site.} -#' \item{taxa}{The names of taxa which must be present within samples in a -#' record.} -#' \item{all_data}{The API only downloads the first 25 records of the query. -#' For the complete records, use `all_data=TRUE`} +#' datasettypes, run `neotoma2::get_table('datasettypes')` +#' * `doi` The dataset DOI for a dataset contained within a site. Can be +#' passed as a vector of DOIs. +#' * `gpid` The geopolitical name or identifier containing a site. Can be +#' passed as a vector of names. +#' * `keywords` Keywords for samples within a set of sites. For example +#' "modern" indicates a sample within the record uses the keyword "modern". +#' * `contacts` Contact names or IDs associated with a site. +#' * `ageyoung` A minimum spanning age for the record, in years before +#' radiocarbon present (1950). +#' * `ageold` A maximum spanning age for the record, in years before +#' radiocarbon present (1950). +#' * `ageof` An age which must be contained within the range of sample ages +#' for a site. +#' * `taxa` The names of taxa which must be present within samples in a +#' record. +#' * `all_data` The API only downloads the first 25 records of the query. +#' For the complete records, use `all_data=TRUE` #' This call will then return a data object that contains site metadata for one #' or more sites, along with limited metadata describing the collection units #' and datasets located at that site. -#' } #' @returns 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 @@ -96,9 +93,9 @@ parse_site <- function(result) { #' Each "site" object contains 6 parameters that can be accessed as well: #' siteid, sitename, location, altitude, description, #' limited collection units information. -#' * `loc` An `sf` object that describes site's location. -#' * `description` -#' * `collunits` limited information on collunits +#' * `loc` An `sf` object that describes site's location. +#' * `description` +#' * `collunits` limited information on collunits #' @examples #' \donttest{ #' ## Find all sites with a min altitude of 12m and a max altitude of 25m @@ -108,7 +105,6 @@ parse_site <- function(result) { #' sites_2500 <- get_sites(altmin=2500, all_data = TRUE) #' ## To find all sites that contain the string "Alex%" #' alex_sites <- get_sites(sitename="Alex%") -#' #' ## To find sites in Brazil (again with default 25 records) #' brazil <- '{"type": "Polygon", #' "coordinates": [[ @@ -154,10 +150,8 @@ get_sites <- function(x = NA, ...) { #' Each "site" object contains 6 parameters that can be accessed as well: #' siteid, sitename, location, altitude, description, #' limited collection units information. -#' \describe{ -#' \item{loc}{ An `sf` object that describes site's location.} -#' \item{collunits}{ limited information on collunits} -#' } +#' * `loc` An `sf` object that describes site's location. +#' * `collunits` limited information on collunits #' @export get_sites.default <- function(...) { # nolint oo <- options(scipen = 9999999) @@ -229,8 +223,8 @@ get_sites.default <- function(...) { # nolint #' Each "site" object contains 6 parameters that can be accessed as well: #' siteid, sitename, location, altitude, description, #' limited collection units information. -#' * `loc` An `sf` object that describes site's location. -#' * `collunits` limited information on collunits +#' * `loc` An `sf` object that describes site's location. +#' * `collunits` limited information on collunits #' @examples { #' ## Find all sites by numeric siteid: #' sites <- get_sites(seq(1,3)) @@ -270,10 +264,8 @@ get_sites.numeric <- function(x, ...) { #' Each "site" object contains 6 parameters that can be accessed as well: #' siteid, sitename, location, altitude, description, #' limited collection units information. -#' \itemize{ -#' \item{loc}{ An `sf` object that describes site's location.} -#' \item{collunits}{ limited information on collunits} -#' } +#' * `loc` An `sf` object that describes site's location. +#' * `collunits` limited information on collunits #' @export get_sites.sites <- function(x, ...) { diff --git a/man/filter.Rd b/man/filter.Rd index d497755..2f3d412 100644 --- a/man/filter.Rd +++ b/man/filter.Rd @@ -21,39 +21,39 @@ 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: \itemize{ -\item{"siteid"}{A numeric site identifier from the Neotoma Database} -\item{"sitename"}{The character string sitename.} -\item{"lat"}{A numeric latitude value.} -\item{"long"}{A numeric longitude value.} -\item{"altitude"}{The elevation of the site. Note that some sites do not +\item \code{siteid} A numeric site identifier from the Neotoma Database. +\item \code{sitename} The character string sitename. +\item \code{lat} A numeric latitude value. +\item \code{long} A numeric longitude value. +\item \code{altitude} The elevation of the site. Note that some sites do not include elevation information. For these an NA value appears, and they -would be removed when using an elevation filter.} -\item{"datasetid"}{A numeric datasetid from Neotoma.} -\item{"database"}{A character string naming the constituent database -from which the dataset is drawn.} -\item{"datasettype"}{A character string representing one of the many -dataset types within Neotoma.} -\item{"age_range_old"}{A dataset-level parameter indicating the oldest -date covered by the dataset chronology.} -\item{"age_range_young"}{A dataset-level parameter indicating the youngest -date covered by the dataset chronology.} -\item{"notes"}{Free-form dataset notes provided by the dataset PI(s), -analysts or data stewards.} -\item{"collectionunitid"}{A numeric collection unit identifier from -Neotoma.} -\item{"handle"}{A character string identifying the collection unit. These -are often shorter form names (originally a default 8 character length).} -\item{"collectionunitname"}{A character string identifying the collection -unit name.} -\item{"colldate"}{The date on which the collection unit was sampled. Many -of these are empty.} -\item{"location"}{A free-form character string indicating the location of -the collection unit within the site.} -\item{"waterdepth"}{A numeric depth at which the core was obtained.} -\item{"collunittype"}{A character string for the collection unit type.} -\item{"collectiondevice"}{A fixed vocabulary term for the collection -device.} -\item{"depositionalenvironment"}{A fixed vocabulary name for the -depositional environment.} +would be removed when using an elevation filter. +\item \code{datasetid} A numeric datasetid from Neotoma. +\item \code{database} A character string naming the constituent database +from which the dataset is drawn. +\item \code{datasettype} A character string representing one of the many +dataset types within Neotoma. +\item \code{age_range_old} A dataset-level parameter indicating the oldest +date covered by the dataset chronology. +\item \code{age_range_young} A dataset-level parameter indicating the youngest +date covered by the dataset chronology. +\item \code{notes} Free-form dataset notes provided by the dataset PI(s), +analysts or data stewards. +\item \code{collectionunitid} A numeric collection unit identifier from +Neotoma. +\item \code{handle} A character string identifying the collection unit. These +are often shorter form names (originally a default 8 character length). +\item \code{collectionunitname} A character string identifying the collection +unit name. +\item \code{colldate} The date on which the collection unit was sampled. Many +of these are empty. +\item \code{location} A free-form character string indicating the location of +the collection unit within the site. +\item \code{waterdepth} A numeric depth at which the core was obtained. +\item \code{collunittype} A character string for the collection unit type. +\item \code{collectiondevice} A fixed vocabulary term for the collection +device. +\item \code{depositionalenvironment} A fixed vocabulary name for the +depositional environment. } } diff --git a/man/filter.sites.Rd b/man/filter.sites.Rd index 9122644..dcd7c35 100644 --- a/man/filter.sites.Rd +++ b/man/filter.sites.Rd @@ -21,40 +21,40 @@ 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: \itemize{ -\item{"siteid"}{A numeric site identifier from the Neotoma Database} -\item{"sitename"}{The character string sitename.} -\item{"lat"}{A numeric latitude value.} -\item{"long"}{A numeric longitude value.} -\item{"altitude"}{The elevation of the site. Note that some sites do not +\item \code{siteid} A numeric site identifier from the Neotoma Database. +\item \code{sitename} The character string sitename. +\item \code{lat} A numeric latitude value. +\item \code{long} A numeric longitude value. +\item \code{altitude} The elevation of the site. Note that some sites do not include elevation information. For these an NA value appears, and they -would be removed when using an elevation filter.} -\item{"datasetid"}{A numeric datasetid from Neotoma.} -\item{"database"}{A character string naming the constituent database -from which the dataset is drawn.} -\item{"datasettype"}{A character string representing one of the many -dataset types within Neotoma.} -\item{"age_range_old"}{A dataset-level parameter indicating the oldest -date covered by the dataset chronology.} -\item{"age_range_young"}{A dataset-level parameter indicating the youngest -date covered by the dataset chronology.} -\item{"notes"}{Free-form dataset notes provided by the dataset PI(s), -analysts or data stewards.} -\item{"collectionunitid"}{A numeric collection unit identifier from -Neotoma.} -\item{"handle"}{A character string identifying the collection unit. These -are often shorter form names (originally a default 8 character length).} -\item{"collectionunitname"}{A character string identifying the collection -unit name.} -\item{"colldate"}{The date on which the collection unit was sampled. Many -of these are empty.} -\item{"location"}{A free-form character string indicating the location of -the collection unit within the site.} -\item{"waterdepth"}{A numeric depth at which the core was obtained.} -\item{"collunittype"}{A character string for the collection unit type.} -\item{"collectiondevice"}{A fixed vocabulary term for the collection -device.} -\item{"depositionalenvironment"}{A fixed vocabulary name for the -depositional environment.} +would be removed when using an elevation filter. +\item \code{datasetid} A numeric datasetid from Neotoma. +\item \code{database} A character string naming the constituent database +from which the dataset is drawn. +\item \code{datasettype} A character string representing one of the many +dataset types within Neotoma. +\item \code{age_range_old} A dataset-level parameter indicating the oldest +date covered by the dataset chronology. +\item \code{age_range_young} A dataset-level parameter indicating the youngest +date covered by the dataset chronology. +\item \code{notes} Free-form dataset notes provided by the dataset PI(s), +analysts or data stewards. +\item \code{collectionunitid} A numeric collection unit identifier from +Neotoma. +\item \code{handle} A character string identifying the collection unit. These +are often shorter form names (originally a default 8 character length). +\item \code{collectionunitname} A character string identifying the collection +unit name. +\item \code{colldate} The date on which the collection unit was sampled. Many +of these are empty. +\item \code{location} A free-form character string indicating the location of +the collection unit within the site. +\item \code{waterdepth} A numeric depth at which the core was obtained. +\item \code{collunittype} A character string for the collection unit type. +\item \code{collectiondevice} A fixed vocabulary term for the collection +device. +\item \code{depositionalenvironment} A fixed vocabulary name for the +depositional environment. } } \examples{ diff --git a/man/get_sites.Rd b/man/get_sites.Rd index ec0e6df..8f8a52b 100644 --- a/man/get_sites.Rd +++ b/man/get_sites.Rd @@ -44,35 +44,34 @@ objects. The \code{get_sites()} command wraps the Neotoma API The call itself uses a SQL query which accepts any one of the following parameters: \itemize{ -\item{\code{siteid}}{The unique site ID (integer) in Neotoma. Can be passed as a -vector of site IDs.} -\item{sitename}{The site name, or approximate match using the \% wildcard.} -\item{database}{The constituent database for the record. See -\code{get_table("constituentdatabases")}} -\item{altmin}{The minimum altitude range for site elevation (in meters).} -\item{altmax}{The maximum altitude range for site elevation (in meters).} -\item{datasetid}{The unique dataset ID (integer) in Neotoma. Can be passed -as a vector of dataset IDs.} -\item{datasettype}{Neotoma contains data for a number of datasettypes. +\item \code{siteid} The unique site ID (integer) in Neotoma. Can be passed as a +vector of site IDs. +\item \code{sitename} The site name, or approximate match using the \% wildcard. +\item \code{database} The constituent database for the record. See \code{get_table("constituentdatabases")} +\item \code{altmin} The minimum altitude range for site elevation (in meters). +\item \code{altmax} The maximum altitude range for site elevation (in meters). +\item \code{datasetid} The unique dataset ID (integer) in Neotoma. Can be passed +as a vector of dataset IDs. +\item \code{datasettype} Neotoma contains data for a number of datasettypes. This returns a subset of data types. For a complete list of available -datasettypes, run \code{neotoma2::get_table('datasettypes')}} -\item{doi}{The dataset DOI for a dataset contained within a site. Can be -passed as a vector of DOIs.} -\item{gpid}{The geopolitical name or identifier containing a site. Can be -passed as a vector of names.} -\item{keywords}{Keywords for samples within a set of sites. For example -"modern" indicates a sample within the record uses the keyword "modern".} -\item{contacts}{Contact names or IDs associated with a site.} -\item{ageyoung}{A minimum spanning age for the record, in years before -radiocarbon present (1950).} -\item{ageold}{A maximum spanning age for the record, in years before -radiocarbon present (1950).} -\item{ageof}{An age which must be contained within the range of sample ages -for a site.} -\item{taxa}{The names of taxa which must be present within samples in a -record.} -\item{all_data}{The API only downloads the first 25 records of the query. -For the complete records, use \code{all_data=TRUE}} +datasettypes, run \code{neotoma2::get_table('datasettypes')} +\item \code{doi} The dataset DOI for a dataset contained within a site. Can be +passed as a vector of DOIs. +\item \code{gpid} The geopolitical name or identifier containing a site. Can be +passed as a vector of names. +\item \code{keywords} Keywords for samples within a set of sites. For example +"modern" indicates a sample within the record uses the keyword "modern". +\item \code{contacts} Contact names or IDs associated with a site. +\item \code{ageyoung} A minimum spanning age for the record, in years before +radiocarbon present (1950). +\item \code{ageold} A maximum spanning age for the record, in years before +radiocarbon present (1950). +\item \code{ageof} An age which must be contained within the range of sample ages +for a site. +\item \code{taxa} The names of taxa which must be present within samples in a +record. +\item \code{all_data} The API only downloads the first 25 records of the query. +For the complete records, use \code{all_data=TRUE} This call will then return a data object that contains site metadata for one or more sites, along with limited metadata describing the collection units and datasets located at that site. @@ -87,7 +86,6 @@ sites_12to25 <- get_sites(altmin=12, altmax=25) sites_2500 <- get_sites(altmin=2500, all_data = TRUE) ## To find all sites that contain the string "Alex\%" alex_sites <- get_sites(sitename="Alex\%") - ## To find sites in Brazil (again with default 25 records) brazil <- '{"type": "Polygon", "coordinates": [[ diff --git a/man/get_sites.default.Rd b/man/get_sites.default.Rd index f256356..11bc828 100644 --- a/man/get_sites.default.Rd +++ b/man/get_sites.default.Rd @@ -17,9 +17,9 @@ 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. -\describe{ -\item{loc}{ An \code{sf} object that describes site's location.} -\item{collunits}{ limited information on collunits} +\itemize{ +\item \code{loc} An \code{sf} object that describes site's location. +\item \code{collunits} limited information on collunits } } \description{ diff --git a/man/get_sites.sites.Rd b/man/get_sites.sites.Rd index a1f29c9..941f511 100644 --- a/man/get_sites.sites.Rd +++ b/man/get_sites.sites.Rd @@ -20,8 +20,8 @@ Each "site" object contains 6 parameters that can be accessed as well: siteid, sitename, location, altitude, description, limited collection units information. \itemize{ -\item{loc}{ An \code{sf} object that describes site's location.} -\item{collunits}{ limited information on collunits} +\item \code{loc} An \code{sf} object that describes site's location. +\item \code{collunits} limited information on collunits } } \description{