0

I'm attempting to get started with packaging a few scripts I've developed for my personal use using the package development book at http://r-pkgs.had.co.nz/intro.html. I keep running into problems getting the development tools installed, which has proved very frustrating.

This is for R ver 3.4.4, which is already setup to work with knitr and rmarkdown for generating reports. It is on a company network and computer, which puts the network largely out of my control. I do have RTools (v.3.5.0.4) installed, which is in the same directory as RBuildTools.

When running 'has_devel()', I encounter a loop wherein Rstudio attempts to install RBuildTools, completes with no errors or notifications, but when re-checking 'has_devel()' it attempts to install it again.

I've gone through the list of https://github.com/r-lib/devtools/issues/234 but none of the solutions have worked.

Session info

R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets 
[6] methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4    yaml_2.2.0    
[4] xfun_0.5      
> library(devtools)
> has_devel()
Error: Could not find tools necessary to compile a package
> has_devel()
trying URL 'https://cran.revolutionanalytics.com/bin/windows/Rtools/Rtools35.exe'
Content type 'application/octet-stream' length 108622512 bytes (103.6 MB)
downloaded 103.6 MB

Error: Could not find tools necessary to compile a package
> has_devel()
Error: Could not find tools necessary to compile a package

Following up on the 'could not find tools' notice, I attempted to load all devtools

devtools::load_all()
Error: No root directory found in \\USERSTORE/02/5028/Documents or its parent directories. Root criterion: contains a file `DESCRIPTION`
In addition: Warning messages:
1: In normalizePath(path.expand(path), winslash, mustWork) :
  path[1]="\\USERSTORE": The specified path is invalid
2: In normalizePath(path.expand(path), winslash, mustWork) :
  path[1]="\\USERSTORE": The specified path is invalid

I'm only trying to setup this environment so that I can begin a simple packaging process.

Community
  • 1
  • 1

1 Answers1

0

I encountered a similar issue, and it was due to the fact that my library install path was defined on a network drive. It looks like the directory for your libraries either doesn't exist, or you don't have the privileges to view them.

You can try changing this by the .libPaths() function, before you run the install command.

JKing
  • 73
  • 6