The title says it all. This error should probably be caught somewhere (most likely in model$setInits(), and given a helpful error message.
Minimal example below:
library(nimble)
code <- nimbleCode({ a ~ dnorm(0, 1) })
inits <- list(a = 0, 1) ## inits list has an unnamed element
Rmodel <- nimbleModel(code)
Rmodel$setInits(inits)
## Error: attempt to use zero-length variable name
The title says it all. This error should probably be caught somewhere (most likely in
model$setInits(), and given a helpful error message.Minimal example below: