RStudio not displaying errors

I’m running a simple model in rstan with the following call:

model <- stan(file=model.stan, data=data.stan, iter =3000, warmup=1000, chains = 3)

When I do this, the model executes and displays all the chain sampling information. I print the model object with print(model) and it displays what I’d expect.

However, when I execute a second model that I know has errors, RStudio doesn’t display any sampling information; it just goes right to the line marker carrot symbol allowing me to run another line of code. But if I do print(model2) it doesn’t display anything.

I’m using a standard RStudio .rstheme so there shouldn’t be anything wrong there. I’m running macOS Catalina 10.15.4, RStudio 1.2.5024 and R 3.6.3.

This also doesn’t seem to be an RStudio issue. I have the same problem running the code in the R Console.

Is this something others have experienced? I’d love to be able to fix this so I can take advantage of Stan’s error tracing capabilities.

1 Like

You need to install RStan from source via

install.packages("rstan", type = "source")

or upgrade to R 4.0 if you want to use the binary packages, which is probably better.

1 Like