Skip to content

Commit

Permalink
fix to bigsearch to convert logicals internally to 1/0 as API needs fix
Browse files Browse the repository at this point in the history
#46

bump version
  • Loading branch information
sckott committed Dec 1, 2015
1 parent 9e8ca9a commit 999d52c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Description: Retrieve, map and summarize data from the 'VertNet.org' archives.
Functions allow searching by many parameters, including 'taxonomic' names,
places, and dates. In addition, there is an interface for conducting spatially
delimited searches, and another for requesting large 'datasets' via email.
Version: 0.4.0
Version: 0.4.0.9200
Author: Scott Chamberlain [aut, cre], Chris Ray [aut], Vijay Barve [aut]
Maintainer: Scott Chamberlain <myrmecocystus@gmail.com>
License: MIT + file LICENSE
Expand Down
30 changes: 16 additions & 14 deletions R/bigsearch.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,25 @@
#' }

bigsearch <- function(specificepithet = NULL, genus = NULL, family = NULL, order = NULL,
class = NULL, compact = FALSE, year = NULL, date = NULL,
mappable = NULL, error = NULL, continent = NULL, cntry = NULL,
stateprovince = NULL, county = NULL, island = NULL, igroup = NULL,
inst = NULL, id = NULL, catalognumber = NULL, collector = NULL,
type = NULL, hastypestatus = NULL, media = NULL, rank = NULL,
tissue = NULL, resource = NULL, rfile, email, verbose = TRUE, ...){
class = NULL, compact = FALSE, year = NULL, date = NULL,
mappable = NULL, error = NULL, continent = NULL, cntry = NULL,
stateprovince = NULL, county = NULL, island = NULL, igroup = NULL,
inst = NULL, id = NULL, catalognumber = NULL, collector = NULL,
type = NULL, hastypestatus = NULL, media = NULL, rank = NULL,
tissue = NULL, resource = NULL, rfile, email, verbose = TRUE, ...){

args <- compact(list(specificepithet = specificepithet, genus = genus, family = family,
order = order, class = class, eventdate = date,
mappable = mappable, coordinateuncertaintyinmeters = error,
continent = continent, country = cntry, stateprovince = stateprovince,
county = county, island = island, islandgroup = igroup,
institutioncode = inst, occurrenceid = id, catalognumber = catalognumber,
recordedby = collector, type = type, hastypestatus = hastypestatus,
media = media, rank = rank, tissue = tissue, resource = resource))
order = order, class = class, eventdate = date,
mappable = ab(mappable), coordinateuncertaintyinmeters = error,
continent = continent, country = cntry, stateprovince = stateprovince,
county = county, island = island, islandgroup = igroup,
institutioncode = inst, occurrenceid = id, catalognumber = catalognumber,
recordedby = collector, type = type, hastypestatus = hastypestatus,
media = ab(media), rank = rank, tissue = ab(tissue), resource = resource))
args <- compact(c(args, combyr(year)))
if (length(args) == 0) stop("You must use at least one parameter to specify your query", call. = FALSE)
if (length(args) == 0) {
stop("You must use at least one parameter to specify your query", call. = FALSE)
}
vertwrapper(fxn = "bigsearch", args = args, lim = NULL, rfile = rfile, email = email,
compact = FALSE, verbose = verbose, ...)
}
14 changes: 7 additions & 7 deletions R/searchbyterm.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ searchbyterm <- function(specificepithet = NULL, genus = NULL, family = NULL, or
resource = NULL, verbose = TRUE, ...) {

args <- compact(list(specificepithet = specificepithet, genus = genus, family = family,
order = order, class = class, eventdate = date,
mappable = ab(mappable), coordinateuncertaintyinmeters = error,
continent = continent, country = cntry, stateprovince = sp_paren(stateprovince),
county = county, island = island, islandgroup = igroup,
institutioncode = inst, occurrenceid = id, catalognumber = catalognumber,
recordedby = collector, type = type, hastypestatus = hastypestatus,
media = ab(media), rank = rank, tissue = ab(tissue), resource = resource))
order = order, class = class, eventdate = date,
mappable = ab(mappable), coordinateuncertaintyinmeters = error,
continent = continent, country = cntry, stateprovince = sp_paren(stateprovince),
county = county, island = island, islandgroup = igroup,
institutioncode = inst, occurrenceid = id, catalognumber = catalognumber,
recordedby = collector, type = type, hastypestatus = hastypestatus,
media = ab(media), rank = rank, tissue = ab(tissue), resource = resource))
args <- compact(c(args, combyr(year)))
vertwrapper(fxn = "searchbyterm", args = args, lim = limit, compact = compact, verbose = verbose, ...)
}
Expand Down

0 comments on commit 999d52c

Please sign in to comment.