@bgoodri how do versions work with CRAN? Would it be possible to have a sort of 2-part version number? Like 2.19.1-0, 2.19.1-1, 2.19.1-2, etc? or add another dot? That way it’s easy to track which underlying Stan version it’s using.
It is usually the same as Stan for the major number and the minor number. 2.18.1-10 is different because it was compatible with both 2.18.x and 2.19.x.
I agree. But…
I’m not sure about that. A lot of what’s going on is versions of StanHeaders that don’t actually line up with versions of Stan or the math library because of version compatibility requirements on CRAN. As Ben says:
I believe other headers versions have also been out of synch due to patches required for RStan and StanHeaders.
I removed rstan
, installed StanHeaders
first from the Github repos (don’t forget to modify the install-github.R file to be sure that all branches point to “develop”). The version number of StanHeaders didn’t change i.e still 2.18.1-10 but I can know access features I couldn’t with the version on CRAN (e.g new GP covariance functions).
Hope it helps
> library(rstan)
Loading required package: StanHeaders
Loading required package: ggplot2
rstan (Version 2.19.2, GitRev: 2e1f913d3ca3)
For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores()).
To avoid recompilation of unchanged Stan programs, we recommend calling
rstan_options(auto_write = TRUE)
> packageVersion("StanHeaders")
[1] ‘2.18.1.10’
> stan_version()
[1] "2.19.1"
> sessionInfo()
R version 3.6.1 Patched (2019-07-06 r76792)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Arch Linux
Matrix products: default
BLAS: /usr/lib/libopenblasp-r0.3.6.so
LAPACK: /usr/lib/liblapack.so.3.8.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] rstan_2.19.2 ggplot2_3.2.0
[3] StanHeaders_2.18.1-10
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 magrittr_1.5 tidyselect_0.2.5
[4] munsell_0.5.0 colorspace_1.4-1 R6_2.4.0
[7] rlang_0.4.0 dplyr_0.8.3 parallel_3.6.1
[10] pkgbuild_1.0.3 grid_3.6.1 gtable_0.3.0
[13] loo_2.1.0 cli_1.1.0 withr_2.1.2
[16] matrixStats_0.54.0 lazyeval_0.2.2 assertthat_0.2.1
[19] tibble_2.1.3 crayon_1.3.4 processx_3.4.0
[22] gridExtra_2.3 purrr_0.3.2 callr_3.3.0
[25] ps_1.3.0 inline_0.3.15 glue_1.3.1
[28] compiler_3.6.1 pillar_1.4.2 scales_1.0.0
[31] prettyunits_1.0.2 stats4_3.6.1 pkgconfig_2.0.2
Indeed. Thanks for the instructions. This is always a mystery to me.
My main point is that it seems not straight forward to me to find out which version of Stan/math is used in StanHeaders, which in turn makes it hard to be sure if a bug fix (or a new feature) is included in the current StanHeaders version on CRAN.
I understand that CRAN requirements can make a divergence of version numbers necessary, in which case it would be helpful to include information about the underlying stan/math version in the NEWs section on CRAN.
I also admit that this is probably not an issue for most rstan users. I just stumbled over it recently when I ran into trouble with the ordered logistics function lpmf.
@bgoodri — would there be a way to put that on the CRAN page?
Yeah, I’ll put it into NEWS file next time.