Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/nimble/R/BUGS_modelDef.R
Original file line number Diff line number Diff line change
Expand Up @@ -2932,7 +2932,7 @@ modelDefClass$methods(buildSymbolTable = function() {
})


modelDefClass$methods(newModel = function(data = list(), inits = list(), where = globalenv(), modelName = character(), check = getNimbleOption('checkModel'), calculate = TRUE, debug = FALSE) {
modelDefClass$methods(newModel = function(data = list(), inits = list(), where = globalenv(), modelName = character(), check = getNimbleOption('checkModel'), calculate = TRUE, debug = FALSE, rstudioFix = getNimbleOption('doRStudioHangingFix')) {
if(debug) browser()
if(inherits(modelClass, 'uninitializedField')) {
vars <- lapply(varInfo, `[[`, 'maxs')
Expand Down Expand Up @@ -3006,7 +3006,7 @@ modelDefClass$methods(newModel = function(data = list(), inits = list(), where =
if(getNimbleOption('verbose')) message("Checking model calculations")
model$check()
}
fixRStudioHanging(model)
if(rstudioFix) fixRStudioHanging(model)
return(model)
})

Expand Down
1 change: 1 addition & 0 deletions packages/nimble/R/options.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ nimOptimMethod("bobyqa",
compileOnly = FALSE,
buildInterfacesForCompiledNestedNimbleFunctions = FALSE, ## provides interfaces, i.e. named access in R, to all variables in nested compiled nimbleFunctions
clearNimbleFunctionsAfterCompiling = FALSE,
doRStudioHangingFix = FALSE, ## causes implementation of the str method for all dynamically generated classes, to prevent hanging in RStudio
checkModel = FALSE,
checkNimbleFunction = TRUE,
checkDuplicateNodeDefinitions = TRUE,
Expand Down
Loading