I want to know where R is looking for the path. If I could figure that out, I think this error message could be solved and also the fact that if I use the "build" button, it also cannot filnd my RTools40.
Thanks.
hnelson3@ICWWOLFRAM01VG MINGW64 ~/projects
$ R CMD build test1
The system cannot find the path specified.
* checking for file 'test1/DESCRIPTION' ... OK
* preparing 'test1':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
Omitted 'LazyData' from DESCRIPTION
* building 'test1_0.1.0.tar.gz'
In general R uses the path just like any other program.
Do you know what program R is looking for? It apparently does not cause a fatal error, in fact this does not even look like an error, it is just a message on the screen.
Yes I went through all the steps on that page. This is why if I could figure out what path R was looking for, I could figure out why it isn't being found. It is clear that when it looks for RTools40 it is also looking in that unknown same path. By the way, the install.packages('json') listed that page fails for the same reason. Everything else works including the part that locates the RTools executable.
I have asked this question about four or five times with different versions and never gotten an answer. Also if you search the questions, lots of people have similar problems. But knowing what R is trying to do would definitely help figure out why it is unable to do it.
Looks that the path can be cleaned up, I can try doing that
dir("C:\rtools40")
returns character(0) most likely because that command is not actually doing what it seems to be doing. For example, does the \ have to be escaped?
Thanks for your response. If this problem got solved it would be great. Having worked at many organizations, the biggest problem with using r/RStudio is there is no IT support, so solving problems like this are left to me and eventually I encounter a problem that I cannot solve and that becomes the barrier making use of r less that optimal.
That c:\r\rtools40 was the result of following direction on a youtube.com video that promised to fix my problem. It didn't. But I also have rtools in c:\rtools40 so that is not what is causing the problem
The output of the "Build" Button that is asks to install rtools. If I let it do that, it will install rtools which I can verify by looking at the c: drive. If I build again, the exact same thing will happen.
In a way, It looks like I found a work around. The build works from the command line even though it doesn't work with the RStudio action button. I can create a tar.gz file for the package, then install it.
First Build the Package
hnelson3@ICWWOLFRAM01VG MINGW64 ~/projects
$ R CMD build test1
The system cannot find the path specified.
* checking for file 'test1/DESCRIPTION' ... OK
* preparing 'test1':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
Omitted 'LazyData' from DESCRIPTION
* building 'test1_0.1.0.tar.gz'
hnelson3@ICWWOLFRAM01VG MINGW64 ~/projects
$
Next Build the Package
hnelson3@ICWWOLFRAM01VG MINGW64 ~/projects
$ ls
test1 test1_0.1.0.tar.gz testpackage
hnelson3@ICWWOLFRAM01VG MINGW64 ~/projects
$ R CMD INSTALL test1
The system cannot find the path specified.
* installing to library 'C:/Users/hnelson3/R/win-library/4.1'
* installing *source* package 'test1' ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'test1'
finding HTML links ... done
hello html
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (test1)
hnelson3@ICWWOLFRAM01VG MINGW64 ~/projects
$
This is clearly an RStudio issue, so maybe you are better off asking a new question (referring to this one) with the appropriate tag.
You could also check the project options in Tools -> Project options -> Build tools, to see if anything seems off there. You can try to delete the RStudio project file (make a backup first), and then re-create it, to start with a clean sheet.
FWIW I have the following here:
INSTALL and restart...: --no-multiarch --with-keep.source
check package: --timings
check package: empty (I have no clue why this is twice)
build binary: empty
Thanks. I keep wondering what path it is looking for when it says it cant find the path. If i knew that, I might be able to fix it. Could be some odd system configuration on my machine.