PLN-team / PLNmodels

A collection of Poisson lognormal models for multivariate count data analysis
https://pln-team.github.io/PLNmodels
GNU General Public License v3.0
54 stars 18 forks source link

PLNmodels is not compatible with R < 4.1 #124

Closed fplazaonate closed 7 months ago

fplazaonate commented 7 months ago

Hi @jchiquet ,

I have tried to install PLNmodels from the CRAN but it failed on R 3.6:

Error in parse(outFile) : 
  /tmp/RtmpUSHbgH/R.INSTALL1b016bcc75b7/PLNmodels/R/ZIPLN.R:96:143: '>' inattendu(e)
95:   covariance <- match.arg(covariance)
96:   if (covariance == "fixed") stopifnot("Omega must be provied for fixed covariance" = inherits(Omega, "matrix") | inherits(Omega, "Matrix")) |>

The pipe operator "|>" has been introduced in R 4.1. Contrary to what is stated in the CRAN, this new release is not compatible with R 3.X

mahendra-mariadassou commented 7 months ago

Hi @fplaza,

Thanks for catching this, there were two instances of |> that went under my radar when I reviewed the code. A hotfix in the master branch will be up quickly and except this to be fixed in the next release.

fplazaonate commented 7 months ago

Hi @mahendra-mariadassou Thanks for the quick reply. Meanwhile, I have installed the version 1.1.0

mahendra-mariadassou commented 7 months ago

You can now install the 1.2.1 version with the hotfix from github using

remotes::install_github("pln-team/PLNmodels")

We'll probably wait for slightly more substantial updates before submitting a new release to CRAN