R/onLoad.R

Defines functions .onLoad

# global reference to shap (will be initialized in .onLoad)
shap_reference <- NULL

.onLoad <- function(libname, pkgname) {
  tryCatch(
  shap_reference <<- reticulate::import("shap", delay_load = TRUE)
  )
}

Try the shapper package in your browser

Any scripts or data that you put into this service are public.

shapper documentation built on Aug. 28, 2020, 9:08 a.m.