diff --git a/R/connection.R b/R/connection.R index f1b1f04..f6640a4 100644 --- a/R/connection.R +++ b/R/connection.R @@ -10,6 +10,8 @@ #' #' @export sas_connect <- function(config) { + .pkgenv$saspy <- reticulate::import("saspy") + if (missing(config)) { .pkgenv$session <- .pkgenv$saspy$SASsession() } else { diff --git a/R/zzz.R b/R/zzz.R index f17de1e..ee4853a 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -1,6 +1,5 @@ .pkgenv <- new.env(parent = emptyenv()) .onAttach <- function(libname, pkgname) { - .pkgenv$saspy <- reticulate::import("saspy") knitr::knit_engines$set(sas = sas_engine) } \ No newline at end of file