Skip to content

Commit

Permalink
new way to initialize package dedicated environment (and avoid locked…
Browse files Browse the repository at this point in the history
… binding issue)
  • Loading branch information
gdurif committed Aug 25, 2021
1 parent cf9327c commit af84fcb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R-pkg/R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
env <- new.env(parent = emptyenv())

.onLoad <- function(libname, pkgname) {
# set up options
set_diyabcGUI_options(ncore = as.integer(0.75 * parallel::detectCores()))
# setup package global environment
assign("env", new.env(parent = emptyenv()), .GlobalEnv)
init_diyabc_env()
# check if binary files are available
diyabc_bin <- tryCatch(
Expand Down

0 comments on commit af84fcb

Please sign in to comment.