Open stephenll opened 4 years ago
@jgabry Can you fix this? It got broken by the thing that fixed the case where the user had a symbol in the data
block named i
.
I can try, but I don't see how going from sapply to a loop would break that (that's the only change in that PR https://github.com/stan-dev/rstan/pull/655/files). Any idea why that change causes this?
Also thanks @stephenll for reporting this!
I think the sapply changes the environment in which the parsing function is called.
On Mon, Nov 4, 2019 at 8:17 PM Jonah Gabry notifications@github.com wrote:
I can try, but I don't see how going from sapply to a loop would break that (that's the only change in that PR https://github.com/stan-dev/rstan/pull/655/files). Any idea why that change causes this?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstan/issues/690?email_source=notifications&email_token=AAZ2XKQ7R7LC25KZPINFJ4TQSDCT3A5CNFSM4ISBLZQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDBIUCA#issuecomment-549620232, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ2XKUQEJ43T3XAKC4XKNTQSDCT3ANCNFSM4ISBLZQA .
Ah ok, thanks.
Changing inherits=FALSE
to inherits=TRUE
in the call to dynGet
here
seems to fix the problem. But presumably it was FALSE
before for a reason. Any unintended consequences to changing it that you can think of?
I can't remember
On Tue, Nov 5, 2019 at 12:56 PM Jonah Gabry notifications@github.com wrote:
Changing inherits=FALSE to inherits=TRUE in the call to dynGet here
seems to fix the problem. But presumably it was FALSE before for a reason. Any unintended consequences to changing it that you can think of?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstan/issues/690?email_source=notifications&email_token=AAZ2XKWCA7VMLB6GOLQJ3Z3QSGXVFA5CNFSM4ISBLZQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDDWWMQ#issuecomment-549940018, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ2XKVRLRE5ESYJRPQ7YEDQSGXVFANCNFSM4ISBLZQA .
Summary:
Please provide a short summary (no more than a sentence or two).
rstan can not load data directly from the calling environment.
Description:
Describe the issue as clearly as possible.
Using the option in
stan()
to load the data directly from the environment rather than passing a list in does not work. I receivedException: variable does not exist
error. I was able to pass in the data directly as a list and that worked.Reproducible Steps:
Please report steps to reproduce the issue. If it's not possible to reproduce, please include a description of how you discovered the issue.
If you have a reproducible example, please include it.
fit <- stan(model_code = code)
Current Output:
If applicable, any relevant output from RStan.
Expected Output:
If applicable, the output you expected from RStan.
RStan Version:
The version of RStan you are running (e.g., from
packageVersion("rstan")
)R Version:
The version of R you are running (e.g., from
R.version.string
)Operating System:
Your operating system (e.g., OS X 10.11.3)
OSX 10.14.6
At my company we can replicate all of this on windows 10 with the latest release versions of R, RStudio, Rtools, rstan, etc...