From kevin.r.coombes at gmail.com  Mon Apr 22 03:46:22 2013
From: kevin.r.coombes at gmail.com (Kevin Coombes)
Date: Sun, 21 Apr 2013 20:46:22 -0500
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: <5174966E.7000701@gmail.com>

Here's the short answer:  Whatever you used to do should still work.

I started this thread, not knowing that it was going to get sucked into 
a whirlpool on the fringes of an operating system religious war.  My 
sincerest apologies to everyone who has gotten confused as a consequence.

I only ran into problem because I installed R 3.0 and Rtools 3.0 on a 
new machine, and accidentally put Rtools in a different location from 
where it used to reside on the machines I used for R 2.whatever.  And so 
the scripts I used to build packages no longer worked because the path 
was wrong. If you can avoid doing something silly like that, then your 
old methods for building and maintaining packages should work the same 
way they always did.

On 4/21/2013 8: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.
>
>
> 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
Kevin Coombes