aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2021-11-19 00:18:22 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2021-11-19 00:18:22 +0100
commit0056584e5168df75bca159ddf3469aa07457b77d (patch)
tree12fae625ede19eba2776a3c5e3d9b3d8f9fd41c5 /R
parentd032fb8ba7b0827bb896b6d9a07d6449d88cf511 (diff)
Update tests and logs
Diffstat (limited to 'R')
-rw-r--r--R/zzz.R12
1 files changed, 4 insertions, 8 deletions
diff --git a/R/zzz.R b/R/zzz.R
index 19ca10d..5503a4a 100644
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -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())
}

Contact - Imprint