Skip to content

Commit

Permalink
Fix for ropensci/neotoma issue ropensci#235.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGoring committed May 10, 2019
1 parent ab41cc4 commit b208e8c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion R/get_dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ get_dataset <- function(x, datasettype, piid, altmin, altmax, loc, gpid, taxonid
#' @importFrom jsonlite fromJSON
#' @importFrom httr GET content
#' @param x A numeric value corresponding to the site ID.
#' @param datasettype A character string corresponding to one of the allowed dataset types in the Neotoma Database. Allowed types include: \code{"geochronologic"}, \code{"loss-on-ignition"}, \code{"pollen"}, \code{"plant macrofossils"}, \code{"vertebrate fauna"}, \code{"mollusks"}, and \code{"pollen surface sample"}.
#' @param datasettype A character string corresponding to one of the allowed dataset types in the Neotoma Database. You can find the full list of allowed datasettypes using: \code{get_table("datasettypes")}.
#' @param piid Numeric value for the Principle Investigator's ID number.
#' @param altmin Numeric value indicating the minimum altitude for the site (can be used alone or with \code{altmax}).
#' @param altmax Numeric value indicating the maximum altitude for the site (can be used alone or with \code{altmin}).
Expand Down
22 changes: 11 additions & 11 deletions R/param_check.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,17 @@ param_check <- function(cl) {
# Parameter check for the datasettype, make sure
# it's one of the accepted types:
if ('datasettype' %in% names(cl)) {
settypes <- c('geochronologic', 'loss-on-ignition', 'pollen', 'plant macrofossil',
'vertebrate fauna', 'macroinvertebrate', 'pollen surface sample',
'insect', 'ostracode', 'water chemistry', 'diatom',
'ostracode surface sample', 'diatom surface sample', 'geochemistry',
'physical sedimentology', 'charcoal', 'testate amoebae',
'X-ray fluorescence (XRF)', 'X-ray diffraction (XRD)',
'energy dispersive X-ray spectroscopy (EDS/EDX)', 'biomarker',
'modern plant biomarker', 'phytolith', 'specimen stable isotope',
'paleomagnetic', 'biochemistry', 'modern biochemistry', 'organic carbon',
'insect modern', 'chironomid', 'stable isotope',
'testate amoebae surface sample', 'charcoal surface sample', 'cladocera')
settypes <- c('biochemistry', 'biomarker', 'charcoal', 'charcoal surface sample',
'chironomid', 'cladocera', 'diatom', 'diatom surface sample',
'diatom top-bottom', 'energy dispersive X-ray spectroscopy (EDS/EDX)',
'geochemistry', 'geochronologic', 'insect', 'insect modern',
'loss-on-ignition', 'macroinvertebrate', 'modern biochemistry',
'modern plant biomarker', 'organic carbon', 'ostracode',
'ostracode surface sample', 'paleomagnetic', 'physical sedimentology',
'phytolith', 'plant macrofossil', 'pollen', 'pollen surface sample',
'specimen stable isotope', 'stable isotope', 'testate amoebae',
'testate amoebae surface sample', 'vertebrate fauna', 'water chemistry',
'X-ray diffraction (XRD)', 'X-ray fluorescence (XRF)')

set <- pmatch(cl$datasettype, settypes, nomatch = NA)
if (is.na(set)) {
Expand Down

0 comments on commit b208e8c

Please sign in to comment.