hrbrmstr / sergeant

:guardsman: Tools to Transform and Query Data with 'Apache' 'Drill'
https://hrbrmstr.github.io/sergeant/
Other
126 stars 13 forks source link

drill_jdbc() returns error #15

Closed hermandr closed 5 years ago

hermandr commented 6 years ago

Hi Bob,

I tried drill_jdbc("localhost")

and it returns error:

Error in stop("Package `", package, "` required for `", fun, "`.\n", "Please install and try again.",  : 
  argument "fun" is missing, with no default

Looking at the code in utils.r

try_require <- function(package, fun) {
  if (requireNamespace(package, quietly = TRUE)) {
    library(package, character.only = TRUE)
    return(invisible())
  }

  stop("Package `", package, "` required for `", fun , "`.\n", # nocov start
    "Please install and try again.", call. = FALSE) # nocov end
}

arg fun is required with no default.

When try_require is called it is missing 2nd arg fun. I suggest set fun = "" in the function definition.

Regards, Herman