diff --git a/R/api.R b/R/api.R index 6f112ff..89c3bcb 100644 --- a/R/api.R +++ b/R/api.R @@ -15,7 +15,7 @@ get_boxes_ = function (..., endpoint) { response = osem_request_(endpoint, path = c('boxes'), ...) if (length(response) == 0) { - warning('no boxes found for this query') + warning('no senseBoxes found for this query') return(osem_as_sensebox(as.data.frame(response))) } diff --git a/R/box.R b/R/box.R index 3854459..49356d8 100644 --- a/R/box.R +++ b/R/box.R @@ -19,7 +19,7 @@ #' @param phenomenon Only return boxes that measured the given phenomenon in the #' time interval as specified through \code{date} or \code{from / to} #' @param endpoint The URL of the openSenseMap API instance -#' @param progress Whether to print download progress information +#' @param progress Whether to print download progress information defaults to \code{TRUE} #' @return A \code{sensebox data.frame} containing a box in each row #' #' @seealso \href{https://docs.opensensemap.org/#api-Measurements-findAllBoxes}{openSenseMap API documentation (web)} @@ -39,7 +39,7 @@ osem_boxes = function (exposure = NA, model = NA, grouptag = NA, date = NA, from = NA, to = NA, phenomenon = NA, endpoint = osem_endpoint(), - progress = T) { + progress = TRUE) { # error, if phenomenon, but no time given if (!is.na(phenomenon) && is.na(date) && is.na(to) && is.na(from)) diff --git a/R/measurement.R b/R/measurement.R index fd12197..666fea3 100644 --- a/R/measurement.R +++ b/R/measurement.R @@ -18,7 +18,7 @@ #' @param exposure Filter sensors by their exposure ('indoor', 'outdoor', 'mobile') #' @param from A \code{POSIXt} like object to select a time interval #' @param to A \code{POSIXt} like object to select a time interval -#' @param columns Select specific column in the output (see oSeM documentation) +#' @param columns Select specific column in the output (see openSenseMap API documentation) #' @param endpoint The URL of the openSenseMap API #' @param progress Whether to print download progress information #' @@ -130,7 +130,7 @@ parse_get_measurements_params = function (params) { } if (!is.na(params$exposure)) query$exposure = params$exposure - if (!is.na(params$columns)) + if (!any(is.na(params$columns))) query$columns = paste(params$columns, collapse = ',') else query$columns = 'value,createdAt,lon,lat,sensorId,unit' diff --git a/man/opensensmapr.Rd b/man/opensensmapr.Rd index 72ddee2..1cd5da0 100644 --- a/man/opensensmapr.Rd +++ b/man/opensensmapr.Rd @@ -91,3 +91,12 @@ openSenseMap API: \url{https://api.opensensemap.org/} official openSenseMap API documentation: \url{https://docs.opensensemap.org/} } +\author{ +\strong{Maintainer}: Norwin Roosen \email{bugs@nroo.de} + +Other contributors: +\itemize{ + \item Daniel Nuest \email{daniel.nuest@uni-muenster.de} (0000-0003-2392-6140) [contributor] +} + +} diff --git a/man/osem_measurements.Rd b/man/osem_measurements.Rd index d30b809..8b1535d 100644 --- a/man/osem_measurements.Rd +++ b/man/osem_measurements.Rd @@ -37,7 +37,7 @@ osem_measurements(x, ...) \item{to}{A \code{POSIXt} like object to select a time interval} -\item{columns}{Select specific column in the output (see oSeM documentation)} +\item{columns}{Select specific column in the output (see openSenseMap API documentation)} \item{endpoint}{The URL of the openSenseMap API} diff --git a/tests/testthat/test_boxes.R b/tests/testthat/test_boxes.R index 79b8fd0..ccc4915 100644 --- a/tests/testthat/test_boxes.R +++ b/tests/testthat/test_boxes.R @@ -63,7 +63,7 @@ test_that("a response with no matches returns empty sensebox data.frame and a wa test_that("a response with no matches gives a warning", { check_api() - expect_warning(osem_boxes(grouptag = "does_not_exist"), "no boxes found") + expect_warning(osem_boxes(grouptag = "does_not_exist"), "no senseBoxes found") }) test_that("data.frame can be converted to sensebox data.frame", {