0

I'm using Windows and is trying to install latentnet package in version 2.1.1. You can locate the package in the following link:

https://cran.r-project.org/src/contrib/Archive/latentnet/latentnet_2.1-1.tar.gz

I tried to use:

    install_version("latentnet", version = "2.1-1", repos = "http://cran.us.r-project.org")

Error message received:

Downloading package from url: http://cran.us.r-project.org/src/contrib/Archive/latentnet/latentnet_2.1-1.tar.gz
WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.1 was found. (Only the following incompatible version(s) of Rtools were found:3.5)

Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.
Installing latentnet
"C:/Program Files/R/R-3.5.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL "C:/Users/wawa0001/AppData/Local/Temp/RtmpCig4et/devtools504261651b3/latentnet"  \
  --library="C:/Users/wawa0001/Documents/R/win-library/3.5" --install-tests 

* installing *source* package 'latentnet' ...
ERROR: a 'NAMESPACE' file is required
* removing 'C:/Users/wawa0001/Documents/R/win-library/3.5/latentnet'
In R CMD INSTALL

Then I tried to download the package to my local drive and used following command:

install.packages("latentnet_2.1-1.tar.gz", repos = NULL)

I received another error message:

Installing package into �C:/Users/wawa0001/Documents/R/win-library/3.5�
(as �lib� is unspecified)
* installing *source* package 'latentnet' ...
ERROR: a 'NAMESPACE' file is required
* removing 'C:/Users/wawa0001/Documents/R/win-library/3.5/latentnet'
* restoring previous 'C:/Users/wawa0001/Documents/R/win-library/3.5/latentnet'
In R CMD INSTALL
Warning in install.packages :
  installation of package ‘latentnet_2.1-1.tar.gz’ had non-zero exit status

It seems I need to create a 'NAMESPACE' file, and I referred to this post: ERROR: a 'NAMESPACE' file is required

However, command tar does not exist on my PC externally or internally and I do not know a way to get it to execute.

Could anyone suggest a way to download the early version of the package? I currently have R 3.4.4.

Thanks!

lydias
  • 841
  • 1
  • 14
  • 32
  • Newer versions of R have stricter requirements for pacakges. If you want to use an older R package, try also using an older version of R (whatever was around at the time of the package version you want to use). You say you have R version 3.4.4 but the message above says "win-library/3.5" which would indicate you have at least R version 3.5 – MrFlick Nov 19 '18 at 20:35
  • @MrFlick Can I use R studio with an older version of R without un- installing 3.5? – lydias Nov 19 '18 at 20:39
  • You can have different versions of R installed side-by-side on your machine. – MrFlick Nov 19 '18 at 20:47
  • @MrFlick I have a mac and the earliest I can go back is 3.3. Latentnet package is still asking for a NAMESPACE file. – lydias Nov 20 '18 at 00:16
  • Version 2.1.1 of that package look alike it was released in Feb 2008. At that time R version 2.6 was current (very old). Since R 3.0 (at least) all packages require namespace files. Why do you need such an old version? You would have to manually create the missing files yourself if you want to fun that code. – MrFlick Nov 20 '18 at 00:24
  • @MrFlick I'm trying to re-run code from this research paper: https://www.jstatsoft.org/article/view/v024i05. The latentent version it used was 2.1.1 Some of the features used in the paper are no longer available in the latest version. – lydias Nov 20 '18 at 00:32

0 Answers0