I am currently trying to install the xml2 package on R/RStudio.
There are firewall restrictions on the device which I am working on which does not allow R/RStudio to connect fetch the packages directly from the repository to install, i.e. I cannot use
install.packages(“xml2”)
As such, I need to go the route of manually downloading each of the packages and their dependencies .tar.gz files and installing manually on RStudio from the locally downloaded file. This seems to be working well for the packages I require thus far, with the exception of xml2.
I have downloaded xml2_1.3.6.tar.gz from here:
https://cran.r-project.org/web/packages/xml2/index.html
However installing this package manually is failing:
> Error in
> download.file(sprintf("https://github.com/rwinlib/libxml2/archive/v%s.zip",
> : cannot open URL
> 'https://github.com/rwinlib/libxml2/archive/v2.10.3.zip' In addition:
> warning message: In
> download.file(sprintf("https://github.com/rwinlib/libxml2/archive/v%s.zip",
> : URL 'https://github.com/rwinlib/libxml2/archive/v2.10.3.zip':
> Timeout of 60 seconds was reached Execution halter make: ***
> [Makevars.win:16 winlibs] Error 1 ERROR: compilation failed for
> package 'xml2' * removing
> 'C:/Users/username/AppData/Local/R/win-library/4.4/xml2'
It seems that the installation is still trying to retrieve certain files online (from Github), which my device does not allow. How can I workaround this?
3