Skip to content

nimbleModel: str. functions added to global environment #1604

@see24

Description

@see24

When I run the example below a bunch of functions eg str.igraph are added to my global environment.

I was able to trace the creation of them to modelDefClass$methods(fixRStudioHanging = function(model). The comment in the code seems to say this was done in 2015 to deal with a problem with RStudio hanging. Is it still needed? Would it work if this function could accept the where argument that md$newModel() accepts? I am using it inside an R package and it is very confusing to users to have these appear.

code <- nimbleCode({
    x ~ dnorm(mu, sd = 1)
    mu ~ dnorm(0, sd = prior_sd)
})
constants = list(prior_sd = 1)
data = list(x = 4)
Rmodel <- nimbleModel(code, constants = constants, data = data)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions