1

I tried to install package glmnet and set the dependencies=TRUE, it cannot install the package. And when I tried

setRepositories()

and chose CRAN (extras), it shows this error for installing "glmnet":

Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/macosx/mavericks/contrib/3.2:
Line starting '<!DOCTYPE HTML PUBLI ...' is malformed!

My R version is 3.2.4.

I can't really find a similar situation online, I'd really appreciate if anyone could help me fix this! Thanks!

Andrea
  • 23
  • 3
  • That's a fairly old version of R (released in March 2016). The current version of [`glmnet` requires R ≥ 3.6.0](https://cran.r-project.org/web/packages/glmnet/index.html). I think you need to update R. Then try re-installing `glmnet`. – Maurits Evers Nov 16 '19 at 07:59
  • PS. There are ways to [install older versions of R packages](https://stackoverflow.com/questions/17082341/installing-older-version-of-r-package); in my own personal opinion I'd advise against that. The R ecosystem benefits from the "release-early-release-often" principle, which requires you (or your sys admin) to maintain an up-to-date R environment including up-to-date external packages. – Maurits Evers Nov 16 '19 at 08:53
  • 1
    I fixed it by updating a new version, thank you so much!! – Andrea Nov 17 '19 at 08:08

0 Answers0