diff --git a/README.md b/README.md index 86374faa9..1ea945e5b 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ NIMBLE. Journal of Computational and Graphical Statistics 26:403-413. [https://d In published work that uses NIMBLE, please also cite the package version: -de Valpine, P., C. Paciorek, D. Turek, N. Michaud, C. Anderson-Bergman, F. Obermeyer, C. Wehrhahn Cortes, A. Rodriguez, D. Temple Lang, W. Zhang, S. Paganin, and P. van Dam-Bates. 2024. NIMBLE: MCMC, Particle Filtering, and Programmable Hierarchical Modeling. doi: 10.5281/zenodo.1211190. R package version 1.4.1, https://cran.r-project.org/package=nimble. +de Valpine, P., C. Paciorek, D. Turek, N. Michaud, C. Anderson-Bergman, F. Obermeyer, C. Wehrhahn Cortes, A. Rodriguez, D. Temple Lang, W. Zhang, S. Paganin, and P. van Dam-Bates. 2024. NIMBLE: MCMC, Particle Filtering, and Programmable Hierarchical Modeling. doi: 10.5281/zenodo.1211190. R package version 1.4.2, https://cran.r-project.org/package=nimble. To help us track usage to justify funding support for NIMBLE, please include the DOI in the citation. diff --git a/packages/nimble/DESCRIPTION b/packages/nimble/DESCRIPTION index 5ca30c937..8c9d46484 100644 --- a/packages/nimble/DESCRIPTION +++ b/packages/nimble/DESCRIPTION @@ -15,8 +15,8 @@ Description: A system for writing hierarchical statistical models largely of MCMC as the main goal of the 'BUGS'/'JAGS' language for writing models, one can use 'NIMBLE' for writing arbitrary other kinds of model-generic algorithms as well. A full User Manual is available at . -Version: 1.4.2 -Date: 2026-04-01 +Version: 1.4.3 +Date: 2026-05-01 Maintainer: Christopher Paciorek Authors@R: c( person("Perry", "de Valpine", role = "aut"), diff --git a/packages/nimble/R/BUGS_modelDef.R b/packages/nimble/R/BUGS_modelDef.R index 4e242023d..53e2d0f70 100644 --- a/packages/nimble/R/BUGS_modelDef.R +++ b/packages/nimble/R/BUGS_modelDef.R @@ -299,7 +299,7 @@ modelDefClass$methods(assignConstants = function(constants) { if(!is.list(constants) || is.null(names(constants))) stop('constants argument must be a named list') list2env(constants, constantsEnv) constantsList <<- constants - constantsNamesList <<- lapply(ls(constants), as.name) + constantsNamesList <<- lapply(ls(constants, all.names = TRUE), as.name) constantLengths <- unlist(lapply(constants, length)) if(any(constantLengths > 1)) { iLong <- which(constantLengths > 1) @@ -1410,7 +1410,7 @@ expandContextAndReplacements <- function(allReplacements, allReplacementNameExpr ## when done, we will have created a new environment and want to remove the constants from it namesToRemoveAtEnd <- ls(constantsEnv) - constantsEnvCopy <- list2env(as.list(constantsEnv)) + constantsEnvCopy <- list2env(as.list(constantsEnv, all.names = TRUE)) ## some replacements like min(j:100) should no longer be needed but are still there ## If this all works, useContext can be removed diff --git a/packages/nimble/R/BUGS_nimbleGraph.R b/packages/nimble/R/BUGS_nimbleGraph.R index 39900a585..a3d1d208a 100644 --- a/packages/nimble/R/BUGS_nimbleGraph.R +++ b/packages/nimble/R/BUGS_nimbleGraph.R @@ -194,7 +194,7 @@ getConditionallyIndependentSets <- function(model, if(!missing(nodes)) { if(missing(givenNodes)) - givenNodesIDs <- setdiff(givenNodeIDs, nodeIDs) + givenNodeIDs <- setdiff(givenNodeIDs, nodeIDs) } if(!missing(givenNodes)) { nodeIDs <- setdiff(nodeIDs, givenNodeIDs)