diff options
Diffstat (limited to 'R')
-rw-r--r-- | R/chent.R | 1 | ||||
-rw-r--r-- | R/zzz.R | 8 |
2 files changed, 3 insertions, 6 deletions
@@ -24,7 +24,6 @@ #' if (!is.null(caffeine$Picture)) { #' plot(caffeine) #' } - chent <- R6Class("chent", public = list( #' @field identifier (`character(1)`)\cr @@ -1,11 +1,9 @@ .onLoad = function(libname, pkgname) { - rdkit_available <- FALSE + conf <- reticulate::py_discover_config("rdkit") + rdkit_available <- conf$available rdkit_module <- try( - reticulate::import("rdkit", delay_load = TRUE), + reticulate::import("rdkit"), silent = TRUE) - if (!inherits(rdkit_module, "try-error")) { - rdkit_available <- TRUE - } assign('rdkit_available', rdkit_available, envir = topenv()) assign('rdkit_module', rdkit_module, envir = topenv()) } |