[Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony
Duncan Murdoch
murdoch.duncan at gmail.com
Mon Apr 22 13:23:52 CEST 2013
On 13-04-21 9:22 PM, steven mosher wrote:
> Well, color me confused as heck. I've upgraded to R 3.0 so that I can bring
> my packages up to date, but the instructions surrounding Rtools30 are not a
> model of clarity.
First thing is, you should not pay attention to Gabor's complaints.
They are valid, but they only matter to a tiny minority of R users,
those who use software that requires the ancient "sort" and "find"
utilities from MSDOS. Rtools installs a minimal Unix emulator, and
"sort" and "find" act differently there.
You should also ignore many of the instructions that you find on the
web, because people write them then don't update them when things
change. Pay attention to the R Installation and Administration manual
(which is kept up to date), and the instructions that are installed
along with the tools (and readable on the web site).
If you can't follow those instructions, point out which ones you don't
understand. If you can follow them but things don't work, then describe
what problems you are having.
Duncan Murdoch
>
>
> On Sun, Apr 21, 2013 at 4:04 PM, Gabor Grothendieck <ggrothendieck at gmail.com
>> wrote:
>
>> On Sun, Apr 21, 2013 at 6:17 PM, Henrik Bengtsson <hb at biostat.ucsf.edu>
>> wrote:
>>> I (as well) keep a specific Rsetup.bat file for launching Windows
>>> cmd.exe with the proper PATH etc setup for build R packages etc. It's
>>> only after this thread I gave it a second thought; you can indeed
>>> temporarily set the PATH via ~/.Rprofile or ~/.Renviron, which *are*
>>> processed at the very beginning when calling 'R CMD ...'.
>>>
>>> EXAMPLE WITH .Rprofile:
>>>
>>> ## ~/.Rprofile (e.g. C:/User/foo/.Rprofile):
>>> path <- unlist(strsplit(Sys.getenv("PATH"), ";"));
>>> path <- c("C:\\Rtools\\bin", "C:\\Rtools\\gcc-4.6.3\\bin", path);
>>> Sys.setenv("PATH"=paste(unique(path), collapse=";"));
>>>
>>> ## DISABLED:
>>> x:\> R --no-init-file CMD INSTALL matrixStats_0.6.2.tar.gz
>>> * installing to library 'C:/Users/hb/R/win-library/3.0'
>>> * installing *source* package 'matrixStats' ...
>>> ** libs
>>> *** arch - i386
>>> ERROR: compilation failed for package 'matrixStats'
>>> * removing 'C:/Users/hb/R/win-library/3.0/matrixStats'
>>>
>>> ## ENABLED:
>>> x:\> R CMD INSTALL matrixStats_0.6.2.tar.gz
>>> * installing to library 'C:/Users/hb/R/win-library/3.0'
>>> * installing *source* package 'matrixStats' ...
>>> ** libs
>>> *** arch - i386
>>> gcc -m32 -I"C:/PROGRA~1/R/R-3.0.0patched/include" -DNDEBUG [...]
>>> [...]
>>> * DONE (matrixStats)
>>>
>>>
>>> EXAMPLE WITH .Renviron:
>>> ## ~/.Renviron (e.g. C:/User/foo/.Renviron):
>>> # Backslashes are preserved iff put within quotes
>>> PATH="C:\Rtools\bin;C:\Rtools\gcc-4.6.3\bin;${PATH}"
>>>
>>> x:\> R --no-environ CMD INSTALL matrixStats_0.6.2.tar.gz
>>> => fails
>>>
>>> x:\> R CMD INSTALL matrixStats_0.6.2.tar.gz
>>> => works
>>>
>>> As long as R is on the PATH, the above either of the approaches
>>> removes the need to add Rtools to the PATH via a BAT file and it won't
>>> clutter up your PATH. This begs the question (as somewhat already
>>> proposed), instead of users/developers doing this manually, would it
>>> be possible to have 'R CMD ...' to locate add Rtools to the PATH
>>> internally. That would certainly lower the barriers for newcomers to
>>> install packages from source that need compilation. Obviously, this
>>> doesn't make the tools (e.g. make) in Rtools available outside of R,
>>> it does not allow you to build R itself from source, but it does cover
>>> the very common use cases of calling 'R CMD build/INSTALL/check/...'.
>>>
>>> /Henrik
>>>
>>> PS. Hadley, is this what you meant when you wrote "Better solutions
>>> (e.g. Rstudio and devtools) temporarily set the path on when you're
>>> calling R CMD *.", or those approaches are only when you call 'R CMD'
>>> from the R prompt? I believe the latter, but I just want to make sure
>>> I didn't miss something.
>>
>> That seems like a reasonable approach although the code shown does
>> entail more setup and ongoing maintenance by the user than R.bat which
>> does not require that the user edit any files and additionally locates
>> R itself and has many other features. Also, because R.bat locates R
>> itself it can be useful even if you are not doing development. On the
>> other hand if you are looking to do development strictly from within R
>> then devtools is already developed.
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
More information about the R-devel
mailing list