简体   繁体   中英

How to install packages in R 3.1.3?

I have to use a specific program in R 3.1.3

For that purpose whenever I am trying to install any package it is throwing error

unable to access index for repository http://cran.r-project.org/bin/windows/contrib/3.1

Apparently, it seems the directories in the repos are available from version 3.2 onwards. Here, I am trying to install shiny package.

Hw to resolve this problem?

Per the README at https://cran.r-project.org/bin/windows/contrib/ReadMe :

Packages for R >= 1.7.0 and R < 3.2.0 are available from https://cran-archive.r-project.org/bin/windows/contrib/

So you can try downloading from that site. Note that install.packages may not work as it doesn't seem to have the structure of a regular CRAN mirror, but since you're on Windows you should be able to download the zip files and unzip them into your package directory.

There is no need to download anything, I could figure out that any pakage for R >= 1.7.0 and R < 3.2.0 can be installed using following command

install.packages("BioPhysConnectoR", dependencies=TRUE, repos ="https://cran-archive.r-project.org/")

So, make sure the repos is set as

repos = https://cran-archive.r-project.org/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM