Cocolores
Cocolores

Reputation: 1

Install package from source with tar (not tar.gz) file in R

I have an issue regarding the installation of packages from source in R v. 3.6.0.

I have two R packages which I want to install from source, one is the BiocGenerics from Bioconductor. I need them as dependencies for another software which hasnt been updated after R 3.6.0, which is why I need to use this older R version. BiocGenerics is available as .tar file and .zip file, my other package only as .tar file.

I tried different solutions already:

  1. In R via tools --> install packages --> select the .tar file

  2. unpacked .tar file until penultimate layer (before vignette, R etc), compressed via 7zip to .zip file, then again as 1. in R via tools --> install packages --> select the .zip file --> installation worked partially, but package is invalid

install.packages("C:/Users/Downloads/packagename.zip", repos = NULL, type = "win.binary") Installing package into ‘C:/Users/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified) library(packagename) Error in library(packagename) : ‘packagename’ is not a valid installed package

  1. tried to compress via 7zip to .tar.7z file, then again as 1.

install.packages("D:/packagename_0.0.8.tar.7z", repos = NULL) Installing package into ‘C:/Users/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified) Error in install.packages : type == "both" cannot be used with 'repos = NULL'

  1. tried to compress to .tgz file, then again 1.

install.packages("C:/Users/Downloads/biocgenerics_release_3_6.tgz", repos = NULL, type = .Platform$pkgType) Installing package into ‘C:/Users/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified) Warning in install.packages : error 1 in extracting from zip file Warning in install.packages : cannot open compressed file 'biocgenerics_release_3_6.tgz/DESCRIPTION', probable reason 'No such file or directory' Error in install.packages : cannot open the connection

  1. also the initial .zip file from bioGenerics didnt work in the installation

Do you have any ideas how I could proceed? Do I have to create a tar.gz file or can I install these packages differently, e.g. command line?

Thanks in advance

Upvotes: 0

Views: 71

Answers (0)

Related Questions