Skip to content

Commit

Permalink
Change default arguments to NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeLydeamore committed May 29, 2024
1 parent f28f803 commit 2177508
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions R/client.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#'
#' @export
get_measurements_for_location <- function(
country = "",
city = "",
location = "",
country = NULL,
city = NULL,
location = NULL,
date_from = Sys.Date() - 365,
date_to = Sys.Date(),
is_mobile = FALSE,
Expand All @@ -28,9 +28,9 @@ get_measurements_for_location <- function(

assertthat::assert_that(inherits(date_from, "Date"))
assertthat::assert_that(inherits(date_to, "Date"))
assertthat::assert_that(inherits(country, "character"))
assertthat::assert_that(inherits(city, "character"))
assertthat::assert_that(inherits(location, "character"))
assertthat::assert_that(inherits(country, "character") | is.null(country))
assertthat::assert_that(inherits(city, "character") | is.null(city))
assertthat::assert_that(inherits(location, "character") | is.null(location))
assertthat::assert_that(inherits(is_mobile, "logical"))

attr(date_from, "tzone") <- "UTC"
Expand Down

0 comments on commit 2177508

Please sign in to comment.