5

Where can I find old R packages in .zip format ?

At CRAN for example : http://cran.r-project.org/src/contrib/Archive/shapefiles

there are only sources of .tar.gz files, I have to install old version of shapefiles because some finctions have been removed.

Qbik
  • 5,885
  • 14
  • 62
  • 93
  • 2
    I doubt they exist anywhere. Just build from source, it's not that hard if you follow the instructions carefully. – Joshua Ulrich Jun 24 '13 at 17:37
  • I think if the function is obsolete, it is better/safer to use another alternative: another package maybe... – agstudy Jun 24 '13 at 17:40

4 Answers4

5

Several CRAN mirrors keep old Windows binary versions of packages in a separate directory. See if the version appropriate for your old version of R might be here:

http://cran.cnr.berkeley.edu/bin/windows/contrib

IRTFM
  • 258,963
  • 21
  • 364
  • 487
  • I think the OP wants an older version of the package, not one for an older version of R – Gavin Simpson Jun 24 '13 at 17:58
  • 1
    I'm trying to imagine how that would be different. So far I am unable to do so. – IRTFM Jun 24 '13 at 18:00
  • A *binary* package has changed a lot. By `.zip` we might presume the OP wants a binary package. The sources are still available from CRAN as the OP links to. If all they want are the sources they can use an archive manager that knows about other archive formats. If they want a binary then the advice in my Answer still stands - I doubt anything compiled for R < 2.14 will work with R >= 3.0.1 these days. – Gavin Simpson Jun 24 '13 at 18:03
  • I'm thinking of changes to NAMESPACEs, loading of C code etc. – Gavin Simpson Jun 24 '13 at 18:04
  • Arrgh. I wasn't saying that installing a binary package from past versions would work in a current installation of R. – IRTFM Jun 24 '13 at 18:05
  • No, but you are presuming the OP has an older version of R - my reading of the question is that they want an older version of the package but say nothing about what R they are using. You have to go a long way back to find an older binary of shapefiles and I doubt that will work in newer versions of R. – Gavin Simpson Jun 24 '13 at 18:08
5

Package sources were only ever supplied in tar.gz compressed archives. Other archives (eg .zip) were binary packages for Windows or MacOS X. CRAN doesn't keep binaries for older versions of packages nor does it keep them for Archived packages, as per its policy.

If you are looking for a pre-built binary then you will either have to build one yourself, or if you are on Windows, you could use the win-builder service to build a Windows binary for you, but you'll need to make sure you change the maintainer details so you get a response and make sure you are allowed by the licence to re-distribute the sources in the manner you are doing. Do note all the caveats on that page before submitting!

Gavin Simpson
  • 170,508
  • 25
  • 396
  • 453
  • 1
    Have you looked at the link I offered? Turns out that even the "home CRAN" page has those zipped binaries. – IRTFM Jun 24 '13 at 17:58
  • Yes - that is up to certain mirrors. The OP will need to hunt back through R versions to find one that fits the package version requirements that they need. I looked back to R 2.14 and it was still 0.7 and R packages changed a lot from 2.14 onwards. – Gavin Simpson Jun 24 '13 at 18:02
4

Old R CRAN binary files for Windows (in fact all files on CRAN) for specific dates are available from the Microsoft Time Machine for CRAN: https://mran.microsoft.com/timemachine

Graham Williams
  • 556
  • 2
  • 10
1

If looking for precompiled binaries of packages for older versions of R than what is available on CRAN, e.g. for installing in a SQL Server Machine Learning Services context where the R version is not easily upgradeable, you can use the cran archive at https://cran-archive.r-project.org/bin/windows/contrib/ {your R version}

For example, this will install from binaries built for R 3.5.x:

install.packages("odbc", type="binary", contriburl = "https://cran-archive.r-project.org/bin/windows/contrib/3.5/")
W. Murphy
  • 1,121
  • 8
  • 15