Skip to content

Commit

Permalink
parent frame 6
Browse files Browse the repository at this point in the history
  • Loading branch information
danielturek committed Jan 24, 2024
1 parent da8a585 commit 4b95292
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nimbleHMC/R/HMC_samplers.R
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ hmc_checkTarget <- function(model, targetNodes, hmcType) {
ADok <- sapply(dists,
function(dist) {
## this took some detective work to find the right environment:
nfObj <- eval(as.name(dist), envir = parent.frame(5))
nfObj <- eval(as.name(dist), envir = parent.frame(6))
if(!is.null(environment(nfObj)$nfMethodRCobject)) {
## user-defined:
return(!isFALSE(environment(nfObj)$nfMethodRCobject[['buildDerivs']]))
Expand Down

0 comments on commit 4b95292

Please sign in to comment.