Hello,
I'm using rstan version 2.8.0 (installed from CRAN) in RStudio and getting a strange error message that I've never seen in previous versions. What's particularly odd is that everything was working fine for a while -- I was fitting models with no problems and trying to wrap my head around the switch from base graphics to ggplot. I have no idea what caused this change, but now I get the following behavior every time I call stan(), illustrated here with the 8schools example:
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.2.2
> library(rstan)
Loading required package: Rcpp
Loading required package: ggplot2
rstan (Version 2.8.0, packaged: 2015-09-19 14:48:38 UTC, GitRev: 05c3d0058b6a)
For execution on a local, multicore CPU with excess RAM we recommend calling
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())
> schools_dat <- list(J = 8,
+ y = c(28, 8, -3, 7, -1, 1, 18, 12),
+ sigma = c(15, 10, 16, 11, 9, 11, 10, 18))
>
> fit <- stan(file = '8schools.r', data = schools_dat,
+ iter = 1000, chains = 4)
Error in readRDS(file.rda) : unknown input format
It looks like file.rda is just a character string giving the file path of the 8schools.r model file. (Incidentally, I use the .r extension so the RStudio editor will recognize it, but the same thing happens if I change it to .stan.) When I open 8schools.r it looks exactly the same as it did earlier, before this problem started. I've tried restarting R, uninstalling and reinstalling rstan, and deleting all the temp dir files that rstan seems to be writing to.
Any suggestions would be greatly appreciated.