This question already has an answer here:
I am posting this question after reading and attempting the suggestions mentioned at :-
Offline install of R package and dependencies
I am looking to create a Local package repository for installing tar.gz packages in a Linux R server instance .
I have followed the instructions exactly as mentioned in this post :-
Step 1 - Downloaded all R packages to the source destination on Linux.
Step 2 - Used library(tools) write_PACKAGES("/path/to/packages/") This created 2 files in /path/to/packages/ :- PACKAGES and PACKAGES.GZ
Step 3 - Launched R (v 3.2.0) and ran this command :- install.packages("ggplot2", contrib.url="file:///path/to/packages/")
However, the CRAN Menu (which prompts for selecting a CRAN mirror) pops up. I was under the impression that it will not. When I proceed to select a repository and hit Okay,I get the following error message :-
Error in download.file(url, destfile, method, mode = "wb", ...) : unused argument (contrib.url = "path/to/packages/")
Can someone, please help.
From the help of
install.packages
(which you can access using?install.packages
) you can see that the correct argument name iscontriburl
without the dot.Apparently you should use it as: