I tried to install custom R package 'sf' in the WRDS cloud via interactive R session, but failed. The instruction from WRDS is:
I followed the instructions and the package 'sf_0.9-6.tar.gz' is already in the '~/lib/R' directory:
When i tried to install the package in the interactive R session, i typed in the code :
install.packages("~/sf_0.9-6.tar.gz", lib = "~/lib/R")
I got the following error:
I don't understand why it is an invalid package, even though i've downloaded the package directly from CRAN. Besides, the package should work on the R 3.6.2.
Could anyone help? I would highly appreciated it!
I faced a similar issue with installation of another user-written package (from CRAN) on R 4.0.5 but, I guess, the root cause of the issue is the same which is that install.packages
can not find the package TAR file in the directory /home/<institutionName>/<userName>
(note: this is what the ~ stands for).
Could you try replacing your code:
install.packages("~/sf_0.9-6.tar.gz", lib = "~/lib/R")
with
install.packages("~/lib/R/sf_0.9-6.tar.gz", lib = "~/lib/R")
Expanding the path of the package to the newly created R sub-folder within the lib folder worked for me.