Installing R on the computer without internet connection

Hello, I am new to RStudio Community. Please let me know if my questions are written down in a correct format. I did not add any codes since there are no codes to post for this topic.

I am currently trying to install R on my computer in a room where there is no internet connection. Since I am using restricted data, I am not allowed to connect the computer to internet - which makes it very difficult to install R on this computer. I googled about this and tried to find out how to install R without internet connection, but was not successful. Could anyone help me with this problem?

Also, after installing R, how can I install packages without internet connection? I read some posts on downloading dependencies in a thumb drive. If anyone can explain this in more detail, I'd be grateful.

Thank you!


Referred here from support.rstudio.com

Installing R (and RStudio and packages) without active internet connection is possible, if a bit of a nuisance.

To allow us to give you a more specific answer please specify two things:

  • what OS is your computer running?
  • do you have admin rights on the computer in question?

But what is required is in principle to download R and RStudio installers to a flash disk, together with the package archives from CRAN in *.tar.gz format. These can be installed from RStudio via Tools - Install Packages... & picking the Package Archive drop down instead of the default CRAN option.

Screenshot%20from%202019-09-19%2010-34-44

Note that you will need to install the entire dependency chain one by one, which can be somewhat time consuming (most of us use tens, if not hundreds, of packages) and prone to error (it is easy to miss one).

1 Like

You can use miniCRAN to download the required packages separately and then transfer them e.g. via a thumb-drive:
https://cran.r-project.org/web/packages/miniCRAN/index.html

3 Likes

Thanks for your insights on this. I downloaded packages through miniCRAN but cannot locate where they were downloaded at. Also, could you explain how I can transfer the downloaded packages to my usb?

Hello,

I have successfully downloaded packages into my usb. But now the problem is I'm having trouble downloading the packages from the folder in my usb into R on my computer without internet access. The code I used was:

install.packages("packagename", repos=NULL, contriburl="path_to_the_file")

I tried several different codes but I keep getting these error messages "unable to access index for repository path_to_the_file", "scheme not supported in URL", and "package is not available"

Do you have any idea what might be the problem? I'd highly appreciate your help.

Have you tried the instructions in this vignette?
https://cran.r-project.org/web/packages/miniCRAN/vignettes/miniCRAN-introduction.html

Also check the system dependencies:

Here are further instructions:

https://www.mango-solutions.com/blog/minicran-developing-internal-cran-repositories

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.