diff --git a/DESCRIPTION b/DESCRIPTION index 69826c4..0ecdfcc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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.9200 +Version: 0.4.0.9300 Author: Scott Chamberlain [aut, cre], Chris Ray [aut], Vijay Barve [aut] Maintainer: Scott Chamberlain License: MIT + file LICENSE diff --git a/man/bigsearch.Rd b/man/bigsearch.Rd index 7d74905..65ab8f3 100644 --- a/man/bigsearch.Rd +++ b/man/bigsearch.Rd @@ -97,7 +97,7 @@ records be made available for download as a tab-delimited text file. } \section{Reading data}{ -We suggest reading data data in with \code{\link[data.table]{fread}} - as it's +We suggest reading data in with \code{\link[data.table]{fread}} - as it's very fast for the sometimes large datasets you will get from using this function, and is usually robust to formatting issues. } diff --git a/man/vert_id.Rd b/man/vert_id.Rd index 95abdd2..34a6632 100644 --- a/man/vert_id.Rd +++ b/man/vert_id.Rd @@ -9,7 +9,8 @@ vert_id(ids, compact = TRUE, verbose = TRUE, ...) \arguments{ \item{ids}{(character) VertNet IDs, one or more. Required.} -\item{compact}{(logical) Return a compact data frame. Default: \code{TRUE}} +\item{compact}{(logical) Return a compact data frame. That is, remove +empty columns. Default: \code{TRUE}} \item{verbose}{(logical) Print progress and information messages. Default: \code{TRUE}} @@ -21,11 +22,15 @@ A list, with data frame of search results, and list of metadata \description{ Search by Vertnet occurrence ID } +\details{ +VertNet IDs can be a variety of things, some URIs (i.e., with http://...), +while others start with \code{urn}. +} \examples{ \dontrun{ -vert_id(ids = "urn:occurrence:Arctos:CUMV:Amph:10008:2243441") -ids <- c("urn:occurrence:Arctos:CUMV:Amph:10008:2243441", - "urn:occurrence:Arctos:CUMV:Fish:65813:2206324", +vert_id(ids = "urn:catalog:AUM:Fish:13271") +ids <- c("http://arctos.database.museum/guid/MSB:Mamm:56979?seid=1643089", + "urn:catalog:CM:Herps:116520", "urn:catalog:AUM:Fish:13271") res <- vert_id(ids) res$data$occurrenceid diff --git a/tests/testthat/test-vertmap.R b/tests/testthat/test-vertmap.R index f7fb774..2290643 100644 --- a/tests/testthat/test-vertmap.R +++ b/tests/testthat/test-vertmap.R @@ -13,6 +13,20 @@ test_that("vertmap works with vertsearch", { expect_is(map1$mapping$x, "name") }) +test_that("vertmap works for maps not distinguished by color", { + skip_on_cran() + + out <- vertsearch("mustela nigripes", verbose = FALSE, limit = 50) + out$data$scientificname <- NULL + map1 <- vertmap(input = out, mapdatabase = "state") + + expect_is(map1, "gg") + expect_is(map1$data, "data.frame") + expect_null(map1$labels$colour) # the difference here + expect_equal(as.character(map1$mapping$x), "long") + expect_is(map1$mapping$x, "name") +}) + test_that("vertmap fails well", { skip_on_cran()