I’ve installed cmdstanr on a windows laptop which seemed to go successfully, and I can compile models fine but I get a strange error when I come to sample from them.
As a demonstration running the example model gives the following error:
library(cmdstanr)
cmdstanr_example()
Compiling Stan program...
Error in !is.null(csv_contents$metadata$save_warmup) && csv_contents$metadata$save_warmup :
invalid 'y' type in 'x && y'
If I load the CSV contents I can see that the metadata$save_warmup
field is set to the character string ‘false’, rather than a R boolean FALSE
or TRUE
. If I explicitly pass save_warmup=TRUE
then it is true
. Either way, it is not parsed as an R boolean hence the if statement failing.
Any ideas what could be causing this or how I can get around it?
I’m on R 4.3.2 with cmdstanr 0.7.1 with cmdstan version 2.35.0