hBayesDM icon indicating copy to clipboard operation
hBayesDM copied to clipboard

Update deprecated syntax for future rstan compatibility

Open andrjohns opened this issue 2 years ago • 1 comments

Now that rstan 2.26 is available on CRAN we need to update the deprecated syntax in your package's Stan models, otherwise it will fail to install with an upcoming version of RStan.

I've also updated the package structure to use the newer rstantools structure, this is needed to allow for rstantools to provide updates to Makevars{.win} files for compatibility with changes to rstan/StanHeaders

The following updates have been made:

  • New array syntax
  • fabs replaced by abs
  • lba_cdf renamed to lba_cdf_fun
    • Newer versions of Stan will require that functions ending in _cdf use the conditional | notation, but the current rstan has a bug and does not recognise it as valid. So by renaming we can satisfy both versions and easily revert the naming later

More information about the deprecated and removed syntax in Stan can be found here:

  • https://mc-stan.org/docs/functions-reference/deprecated-functions.html
  • https://mc-stan.org/docs/functions-reference/removed-functions.html

If you could merge and submit to CRAN soon, it would be greatly appreciated.

Let me know if you have any questions about these changes.

Thanks!

andrjohns avatar Sep 09 '23 04:09 andrjohns

@CCS-Lab would it be possible to push these changes to CRAN soon? Otherwise your package will break with the next rstan version

andrjohns avatar Jan 13 '24 12:01 andrjohns