From murdoch.duncan at gmail.com  Mon Apr 22 13:23:52 2013
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Mon, 22 Apr 2013 07:23:52 -0400
Subject: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony
In-Reply-To: <CAFFLneR6_4haqKAMb025-LcVkEOrC_jNMkm-7VFVYHMKrpBBKw@mail.gmail.com>
References: <5171B903.50401@gmail.com>
	<CAP01uRmCLc67t=t0qeUjsj4QsTVN1vp9VZnWH6iNCYpzjCXJGQ@mail.gmail.com>
	<5172D661.4000703@gmail.com> <5172D84F.3060801@gmail.com>
	<5172DC98.8040308@gmail.com> <517319E5.4040800@gmail.com>
	<CABdHhvFSnwMxx7kDs7vw6LvMTwEzw_X_6=WBQOf3FHqGM2piiQ@mail.gmail.com>
	<CAP01uRkq2PXwrQfN5MAjWuE02QtQxVu8raa2uhW4rOi9BGvuzg@mail.gmail.com>
	<CABdHhvFsiuTmnW8So3TdoKcDVsqtM0sO18NivEjr3JfSG9Bcfg@mail.gmail.com>
	<CAP01uRnP1CJSbtYJHEB3X8GY5CfcbfCgZ=R78SwEuAesYOYMUQ@mail.gmail.com>
	<CABdHhvGQYGa2uJSMFYvL=Ckm=cD27ZAGDQqXPMuhuFr3dRsmUg@mail.gmail.com>
	<CAP01uRmfY1dqk_-8Cq0GodNuFGCGMGcUU6BhBwrNB7hH6bwHeA@mail.gmail.com>
	<CABdHhvHfW6r3fjJeuGUjyRNq0VOBr2YFDiHnu_jmqu6NE7F_WA@mail.gmail.com>
	<CAP01uRnLdB6MA=pbW8C6TJCXFGeSso=HssGNq=GtGKcB7BiK9Q@mail.gmail.com>
	<CAFDcVCRjpWU=PRAC7BBscAiBm1PFb9tK4BWn3NQjrP6PGo=Nhw@mail.gmail.com>
	<CAP01uR=Wx9yL2w8WH=VS7PUsMzJxWjfnyoe0Zw8hf6quuMf7ng@mail.gmail.com>
	<CAFFLneR6_4haqKAMb025-LcVkEOrC_jNMkm-7VFVYHMKrpBBKw@mail.gmail.com>
Message-ID: <51751DC8.9030809@gmail.com>

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
>



[Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony
Duncan Murdoch