diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2021-11-19 00:18:22 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2021-11-19 00:18:22 +0100 |
commit | 0056584e5168df75bca159ddf3469aa07457b77d (patch) | |
tree | 12fae625ede19eba2776a3c5e3d9b3d8f9fd41c5 /R | |
parent | d032fb8ba7b0827bb896b6d9a07d6449d88cf511 (diff) |
Update tests and logs
Diffstat (limited to 'R')
-rw-r--r-- | R/zzz.R | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -1,13 +1,9 @@ .onLoad = function(libname, pkgname) { rdkit_available <- FALSE - if(requireNamespace("reticulate", quietly = TRUE)) { - rdkit_module <- try(reticulate::import("rdkit")) - if (!inherits(rdkit_module, "try-error")) { - rdkit_available <- TRUE - } + rdkit_module <- try(reticulate::import("rdkit"), silent = TRUE) + if (!inherits(rdkit_module, "try-error")) { + rdkit_available <- TRUE } assign('rdkit_available', rdkit_available, envir = topenv()) - if (rdkit_available) { - assign('rdkit_module', rdkit_module, envir = topenv()) - } + assign('rdkit_module', rdkit_module, envir = topenv()) } |