Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2012-01-26 Thread Peter Carr

Corrected with the '-m32' flag for each of the compilers.

On 1/26/12 5:22 PM, Peter Carr wrote:

I get compiler errors:

ld: duplicate symbol _Rf_mkChar in CommandLineArgs.o and CConverters.o

However, I did not explicitly use 32-bit. Is this a compiler flag? I will look 
into it.



On 1/26/12 5:15 PM, Simon Urbanek wrote:

  2) specifically to R 2.5, which I need, I get compiler errors.
> 
You'll have to share much more detail. Note that such an ancient version of R 
may not be buildable on your system without SDKs for older OS X versions (and 
note that recent Xcode tools default to 64-bit which was not supported back 
then so you may need to use 32-bit).





___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2012-01-26 Thread Peter Carr

I get compiler errors:

ld: duplicate symbol _Rf_mkChar in CommandLineArgs.o and CConverters.o

However, I did not explicitly use 32-bit. Is this a compiler flag? I will look 
into it.



On 1/26/12 5:15 PM, Simon Urbanek wrote:

  2) specifically to R 2.5, which I need, I get compiler errors.
>  

You'll have to share much more detail. Note that such an ancient version of R 
may not be buildable on your system without SDKs for older OS X versions (and 
note that recent Xcode tools default to 64-bit which was not supported back 
then so you may need to use 32-bit).




___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2012-01-26 Thread Simon Urbanek
On Jan 26, 2012, at 4:44 PM, Peter Carr wrote:

> That thread does help and it provides enough information to solve most of my 
> problem. However, it is not clear to me how to change the R_HOME directory so 
> that it is not in the /Library/Frameworks/R.framework directory. This is 
> important to me because I am providing a tool which will automatically 
> install R and I don't want my tool to replace an existing version of R.
> 
> I tried building from source, and immediately ran into two problems:
>1) I don't know enough to know how to configure my build so that it 
> doesn't use the Frameworks location

You don't need to use the framework version of R if you don't need the GUI. If 
your copy will be "private" you can use --disable-R-framework and set rhome at 
install time to wherever you want (or alternatively you can set the path of the 
framework if you need it). Note that you'll have to re-compile all packages as 
well.


>2) specifically to R 2.5, which I need, I get compiler errors.
> 

You'll have to share much more detail. Note that such an ancient version of R 
may not be buildable on your system without SDKs for older OS X versions (and 
note that recent Xcode tools default to 64-bit which was not supported back 
then so you may need to use 32-bit).


> I'd like to simply take apart the framework build I get when install from the 
> R-2.5.1.dmg.

It is possible, albeit convoluted. The easy part of to modify R_HOME - you 
simply do that in the R script. The harder part is that all binaries have 
absolute paths to libraries inside the framework. You will have to go through 
every single binary (package, module, executable) and change all paths to your 
new location using install_name_tool. To be honest, given how ancient your R is 
I wouldn't even bother and just keep it in its 2.5 folder since chances that it 
will clash on user's machine are close to zero. But if you choose to tackle 
this, you can take inspiration from this script (it uses @rpath which is a bit 
more flexible but requires more support from binaries):

https://svn.r-project.org/R-dev-web/trunk/QA/Simon/R-build/rpath.sh

An alternative fix is to use DYLD_LIBRARY_PATH to prepend your new location of 
libraries. It may or may not work, depending on what you use from R. It is a 
bit fragile but is fairly easy to do so you can test whether it works for your 
particular setup of using R.


> However, I'd also like this to work, even when I move this to a different 
> location on my file system. I appreciate some guidance on this last step.
> 

That is actually close to impossible unless you are ok with giving up package 
installation. The problem is that a) binary package have full paths encoded and 
b) if you compile a package it will get full path and they need a path to 
compile. However, if you are shipping a "fixed" R that will not be modified by 
adding packages, you can use the same idea as above with the special 
@executable_path prefix. You'll need to perform some gymnastics to infer R_HOME 
in the R script since it will by dynamic, but it's possible -- the following 
patch will give you an idea:

https://svn.r-project.org/R-dev-web/trunk/QA/Simon/R-build/R-rpath-diff

The executive summary is that what you want is possible, but not really easy.

Cheers,
Simon

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2012-01-26 Thread Peter Carr
That thread does help and it provides enough information to solve most of my 
problem. However, it is not clear to me how to change the R_HOME directory so 
that it is not in the /Library/Frameworks/R.framework directory. This is 
important to me because I am providing a tool which will automatically install R 
and I don't want my tool to replace an existing version of R.


I tried building from source, and immediately ran into two problems:
1) I don't know enough to know how to configure my build so that it doesn't 
use the Frameworks location

2) specifically to R 2.5, which I need, I get compiler errors.

I'd like to simply take apart the framework build I get when install from the 
R-2.5.1.dmg. However, I'd also like this to work, even when I move this to a 
different location on my file system. I appreciate some guidance on this last step.


Thanks,
Peter

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2012-01-25 Thread Prof Brian Ripley

On 25/01/2012 01:22, Steve Lianoglou wrote:

Hi Peter,

On Tue, Jan 24, 2012 at 8:06 PM, Peter Carr  wrote:

I, too, would like to run multiple versions of R, via command line, on Mac
OS X. I have looked in vain for a clear explanation of why there can be one
and only one 'Current' version of R running at a time.


That is simply untrue, and would be crippling for the R developers if it 
were true.


Assuming you have multiple R versions installed, all you need to do is 
to invoke their 'R' scripts directly.   There is a problem caused by the 
way Simon installs these scripts in frameworks, so e.g.


/Library/Frameworks/R.framework/Versions/2.13/Resources/bin/R

starts

#!/bin/sh
# Shell wrapper for R executable.

R_HOME_DIR=/Library/Frameworks/R.framework/Resources

but all you have to do is make a copy and change that to e.g.

R_HOME_DIR=/Library/Frameworks/R.framework/Versions/2.13/Resources

[Which is in the thread mentioned.]

And of course, no one said you have to use that particular build of R, 
and for serious users of command-line R a personal build will be more 
convenient (just like any other platform).


If you have packages which use compiled code they are tied (on OS X 
only) to a particular 2.x.* set of R versions, but you can overcome that 
easily enough by using different library directories for different 
versions of R.



You can dig up some info from this thread:

https://stat.ethz.ch/pipermail/r-sig-mac/2011-September/008582.html

I believe the take home message is that if you want to do this
(running different R versions *simultaneously*), you can do some
symlink mojo (you'll find links to examples in that thread) that will
let you do so, and (for the most part), it will work.

The problem arises when you have to install R packages that need be
source compiled. This limitation holds if we are talking about running
R versions that were released as binaries on CRAN (I'm not sure if
this is true when you compile R as a framework build yourself (but my
guess is that it will still be a problem in that scenario, as well)).

I can link you straight to the email that says that (w/ more details),
but you'd probably better be served by just going through the entirety
of that thread.

Hope that helps,
-steve




--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2012-01-24 Thread Steve Lianoglou
Hi Peter,

On Tue, Jan 24, 2012 at 8:06 PM, Peter Carr  wrote:
> I, too, would like to run multiple versions of R, via command line, on Mac
> OS X. I have looked in vain for a clear explanation of why there can be one
> and only one 'Current' version of R running at a time.

You can dig up some info from this thread:

https://stat.ethz.ch/pipermail/r-sig-mac/2011-September/008582.html

I believe the take home message is that if you want to do this
(running different R versions *simultaneously*), you can do some
symlink mojo (you'll find links to examples in that thread) that will
let you do so, and (for the most part), it will work.

The problem arises when you have to install R packages that need be
source compiled. This limitation holds if we are talking about running
R versions that were released as binaries on CRAN (I'm not sure if
this is true when you compile R as a framework build yourself (but my
guess is that it will still be a problem in that scenario, as well)).

I can link you straight to the email that says that (w/ more details),
but you'd probably better be served by just going through the entirety
of that thread.

Hope that helps,
-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2012-01-24 Thread Peter Carr
I, too, would like to run multiple versions of R, via command line, on Mac OS X. 
I have looked in vain for a clear explanation of why there can be one and only 
one 'Current' version of R running at a time.


After running the installer, I manually edit the 
/Library/Frameworks/Versions//Resources/bin/R script.
Replacing the '/Library/Frameworks/R.framework/Resources' with 
'/Library/Frameworks/R.framework/Versions/2.14/Resources'.


Is this sufficient to support multiple versions of R on a Mac?

Thanks,
Peter

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2011-10-11 Thread Marius Hofert
*thanks* a lot, it now works!

Cheers,

Marius

On 2011-10-11, at 16:48 , Simon Urbanek wrote:

> 
> On Oct 11, 2011, at 10:46 AM, Marius Hofert wrote:
> 
>>> You permissions are odd - this is not what installed R looks like, you 
>>> should see
>>> 
>>> ginaz:Versions$ ls -l
>>> total 8
>>> drwxrwxr-x  6 root  admin  204 Mar 26  2010 2.12
>>> drwxrwxr-x  6 root  admin  204 Jul 12 15:44 2.13
>>> drwxrwxr-x  6 root  admin  204 Oct  2 11:01 2.14
>>> drwxrwxr-x  6 root  admin  204 Oct  3 12:05 2.15
>>> lrwxr-xr-x  1 root  admin4 Oct  3 12:05 Current -> 2.15
>>> 
>>> so run
>>> chown -Rh root:admin  /Library/Frameworks/R.framework/
>>> followed by
>>> 
>>> to fix that.
>> 
>> followed by what? With "chown -Rh root:admin 
>> /Library/Frameworks/R.framework/" I get a lot of output of the form: 
>> ...
>> chown: 
>> /Library/Frameworks/R.framework//library/Rcpp/unitTests/runit.Module.client.package.R:
>>  Operation not permitted
>> ...
>> 
> 
> I should have said "run as root" or simply sudo chown ...
> 
> 
>>> 
>>> Cheers,
>>> Simon
>>> 
>>> 
>> 
>> 
> 

ETH Zurich
Dr. Marius Hofert
RiskLab, Department of Mathematics
HG E 65.2
Rämistrasse 101
8092 Zurich
Switzerland

Phone +41 44 632 2423
marius.hof...@math.ethz.ch
http://www.math.ethz.ch/~hofertj

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2011-10-11 Thread Martin Ellis
You'll need to run the chown command using sudo, if the files are owned by root.

Martin

On 11 October 2011 15:46, Marius Hofert  wrote:
>> You permissions are odd - this is not what installed R looks like, you 
>> should see
>>
>> ginaz:Versions$ ls -l
>> total 8
>> drwxrwxr-x  6 root  admin  204 Mar 26  2010 2.12
>> drwxrwxr-x  6 root  admin  204 Jul 12 15:44 2.13
>> drwxrwxr-x  6 root  admin  204 Oct  2 11:01 2.14
>> drwxrwxr-x  6 root  admin  204 Oct  3 12:05 2.15
>> lrwxr-xr-x  1 root  admin    4 Oct  3 12:05 Current -> 2.15
>>
>> so run
>> chown -Rh root:admin  /Library/Frameworks/R.framework/
>> followed by
>>
>> to fix that.
>
> followed by what? With "chown -Rh root:admin 
> /Library/Frameworks/R.framework/" I get a lot of output of the form:
> ...
> chown: 
> /Library/Frameworks/R.framework//library/Rcpp/unitTests/runit.Module.client.package.R:
>  Operation not permitted
> ...
>
>>
>> Cheers,
>> Simon
>>
>>
>
> ___
> R-SIG-Mac mailing list
> R-SIG-Mac@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2011-10-11 Thread Simon Urbanek

On Oct 11, 2011, at 10:46 AM, Marius Hofert wrote:

>> You permissions are odd - this is not what installed R looks like, you 
>> should see
>> 
>> ginaz:Versions$ ls -l
>> total 8
>> drwxrwxr-x  6 root  admin  204 Mar 26  2010 2.12
>> drwxrwxr-x  6 root  admin  204 Jul 12 15:44 2.13
>> drwxrwxr-x  6 root  admin  204 Oct  2 11:01 2.14
>> drwxrwxr-x  6 root  admin  204 Oct  3 12:05 2.15
>> lrwxr-xr-x  1 root  admin4 Oct  3 12:05 Current -> 2.15
>> 
>> so run
>> chown -Rh root:admin  /Library/Frameworks/R.framework/
>> followed by
>> 
>> to fix that.
> 
> followed by what? With "chown -Rh root:admin 
> /Library/Frameworks/R.framework/" I get a lot of output of the form: 
> ...
> chown: 
> /Library/Frameworks/R.framework//library/Rcpp/unitTests/runit.Module.client.package.R:
>  Operation not permitted
> ...
> 

I should have said "run as root" or simply sudo chown ...


>> 
>> Cheers,
>> Simon
>> 
>> 
> 
> 

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2011-10-11 Thread Marius Hofert
> You permissions are odd - this is not what installed R looks like, you should 
> see
> 
> ginaz:Versions$ ls -l
> total 8
> drwxrwxr-x  6 root  admin  204 Mar 26  2010 2.12
> drwxrwxr-x  6 root  admin  204 Jul 12 15:44 2.13
> drwxrwxr-x  6 root  admin  204 Oct  2 11:01 2.14
> drwxrwxr-x  6 root  admin  204 Oct  3 12:05 2.15
> lrwxr-xr-x  1 root  admin4 Oct  3 12:05 Current -> 2.15
> 
> so run
> chown -Rh root:admin  /Library/Frameworks/R.framework/
> followed by
> 
> to fix that.

followed by what? With "chown -Rh root:admin /Library/Frameworks/R.framework/" 
I get a lot of output of the form: 
...
chown: 
/Library/Frameworks/R.framework//library/Rcpp/unitTests/runit.Module.client.package.R:
 Operation not permitted
...

> 
> Cheers,
> Simon
> 
> 

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2011-10-11 Thread Simon Urbanek

On Oct 11, 2011, at 10:35 AM, Marius Hofert wrote:

> 
> On 2011-10-11, at 16:19 , Simon Urbanek wrote:
> 
>> 
>> On Oct 11, 2011, at 6:24 AM, Marius Hofert wrote:
>> 
>>> Hi,
>>> 
>>> I have multiple R versions installed and would like to switch between them 
>>> via setting the symblic link "Current". To make this a bit more convenient, 
>>> I defined two "aliases" in .bashrc:
>>> 
>>> alias R2.13='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln 
>>> -s $d/2.13 $d/Current'
>>> alias R2.14='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln 
>>> -s $d/2.14 $d/Current'
>>> 
>> 
>> Try
>> 
>> ln -sfn 2.13 /Library/Frameworks/R.framework/Versions/Current
>> 
> 
> Dear Simon,
> 
> thanks, I put it in the alias. It now looks like this:
> alias R2.13='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln 
> -sfn $d/2.13 $d/Current'
> (and similarly for R 2.14)
> 
> 
>> You'll need to be admin of the computer, otherwise you'll need sudo
> 
> If I execute (in a new shell, as usual) R2.13, I (still) get:
> 
> bash-3.2$ R2.13
> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
> ln: /Library/Frameworks/R.framework/Versions/Current: Permission denied
> 
> So the obvious would be to "sudo R2.13", but I obtain:
> 
> bash-3.2$ sudo R2.13
> Password:
> sudo: R2.13: command not found
> 
>> or change permissions. Note that for symlinks you'll need extra -h in chown 
>> otherwise you're changing ownership of the target not the link.
> 
> This I also realized :-) I tried that:
> sudo chown -h myuser /Library/Frameworks/R.framework/Versions/Current
> 
> bash-3.2$ ls -al
> total 8
> drwxrwxr-x  5 root wheel  170 Oct 11 15:54 .
> drwxrwxr-x  9 root wheel  306 Oct 11 11:38 ..
> drwxrwxr-x  8 root wheel  272 Oct 11 12:16 2.13
> drwxrwxr-x  6 root wheel  204 Oct 11 11:38 2.14
> lrwxr-xr-x  1 myuser  wheel   45 Oct 11 15:54 Current -> 
> /Library/Frameworks/R.framework/Versions/2.13
> bash-3.2$ 
> 

You permissions are odd - this is not what installed R looks like, you should 
see

ginaz:Versions$ ls -l
total 8
drwxrwxr-x  6 root  admin  204 Mar 26  2010 2.12
drwxrwxr-x  6 root  admin  204 Jul 12 15:44 2.13
drwxrwxr-x  6 root  admin  204 Oct  2 11:01 2.14
drwxrwxr-x  6 root  admin  204 Oct  3 12:05 2.15
lrwxr-xr-x  1 root  admin4 Oct  3 12:05 Current -> 2.15

so run
chown -Rh root:admin  /Library/Frameworks/R.framework/
followed by

to fix that.

Cheers,
Simon



> => okay, root was changed to myuser, that's good. But again, I get 
> 
> bash-3.2$ R2.13
> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
> ln: /Library/Frameworks/R.framework/Versions/Current: Permission denied
> 
> 
> 
>> If in doubt (ie., you messed with permissions before), run sudo chmod g+w -R 
>> /Library/Frameworks/R.framework
> 
> okay, thanks a lot, that's good to know.
> 
>> 
>> Cheers,
>> Simon
>> 
>> 
>>> On executing R2.13 in the terminal, I get:
>>> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
>>> ln: /Library/Frameworks/R.framework/Versions/Current/2.13: Permission denied
>>> 
>>> If I chown Current, I still get:
>>> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
>>> 
>>> I (bad) solution is to put in "sudo" in the alias... 
>>> 
>>> How is it done correctly? 
>>> 
>>> Cheers,
>>> 
>>> Marius
>>> 
>>> PS: I also posted it for future reference, I've only found the idea of 
>>> using ln -s on the help pages/FAQ, but not how to get around the permission 
>>> issue.
>>> ___
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac@r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>> 
>>> 
>> 
> 
> ETH Zurich
> Dr. Marius Hofert
> RiskLab, Department of Mathematics
> HG E 65.2
> Rämistrasse 101
> 8092 Zurich
> Switzerland
> 
> Phone +41 44 632 2423
> marius.hof...@math.ethz.ch
> http://www.math.ethz.ch/~hofertj
> 
> 

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2011-10-11 Thread Marius Hofert

On 2011-10-11, at 16:19 , Simon Urbanek wrote:

> 
> On Oct 11, 2011, at 6:24 AM, Marius Hofert wrote:
> 
>> Hi,
>> 
>> I have multiple R versions installed and would like to switch between them 
>> via setting the symblic link "Current". To make this a bit more convenient, 
>> I defined two "aliases" in .bashrc:
>> 
>> alias R2.13='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln 
>> -s $d/2.13 $d/Current'
>> alias R2.14='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln 
>> -s $d/2.14 $d/Current'
>> 
> 
> Try
> 
> ln -sfn 2.13 /Library/Frameworks/R.framework/Versions/Current
> 

Dear Simon,

thanks, I put it in the alias. It now looks like this:
alias R2.13='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln -sfn 
$d/2.13 $d/Current'
(and similarly for R 2.14)


> You'll need to be admin of the computer, otherwise you'll need sudo

If I execute (in a new shell, as usual) R2.13, I (still) get:

bash-3.2$ R2.13
rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
ln: /Library/Frameworks/R.framework/Versions/Current: Permission denied

So the obvious would be to "sudo R2.13", but I obtain:

bash-3.2$ sudo R2.13
Password:
sudo: R2.13: command not found

> or change permissions. Note that for symlinks you'll need extra -h in chown 
> otherwise you're changing ownership of the target not the link.

This I also realized :-) I tried that:
sudo chown -h myuser /Library/Frameworks/R.framework/Versions/Current

bash-3.2$ ls -al
total 8
drwxrwxr-x  5 root wheel  170 Oct 11 15:54 .
drwxrwxr-x  9 root wheel  306 Oct 11 11:38 ..
drwxrwxr-x  8 root wheel  272 Oct 11 12:16 2.13
drwxrwxr-x  6 root wheel  204 Oct 11 11:38 2.14
lrwxr-xr-x  1 myuser  wheel   45 Oct 11 15:54 Current -> 
/Library/Frameworks/R.framework/Versions/2.13
bash-3.2$ 

=> okay, root was changed to myuser, that's good. But again, I get 

bash-3.2$ R2.13
rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
ln: /Library/Frameworks/R.framework/Versions/Current: Permission denied



> If in doubt (ie., you messed with permissions before), run sudo chmod g+w -R 
> /Library/Frameworks/R.framework

okay, thanks a lot, that's good to know.

> 
> Cheers,
> Simon
> 
> 
>> On executing R2.13 in the terminal, I get:
>> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
>> ln: /Library/Frameworks/R.framework/Versions/Current/2.13: Permission denied
>> 
>> If I chown Current, I still get:
>> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
>> 
>> I (bad) solution is to put in "sudo" in the alias... 
>> 
>> How is it done correctly? 
>> 
>> Cheers,
>> 
>> Marius
>> 
>> PS: I also posted it for future reference, I've only found the idea of using 
>> ln -s on the help pages/FAQ, but not how to get around the permission issue.
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>> 
>> 
> 

ETH Zurich
Dr. Marius Hofert
RiskLab, Department of Mathematics
HG E 65.2
Rämistrasse 101
8092 Zurich
Switzerland

Phone +41 44 632 2423
marius.hof...@math.ethz.ch
http://www.math.ethz.ch/~hofertj

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2011-10-11 Thread Kasper Daniel Hansen
Marius,

Note that this will _not_ make it possible to run the different R
versions simultaneously.

Kasper

On Tue, Oct 11, 2011 at 10:19 AM, Simon Urbanek
 wrote:
>
> On Oct 11, 2011, at 6:24 AM, Marius Hofert wrote:
>
>> Hi,
>>
>> I have multiple R versions installed and would like to switch between them 
>> via setting the symblic link "Current". To make this a bit more convenient, 
>> I defined two "aliases" in .bashrc:
>>
>> alias R2.13='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln 
>> -s $d/2.13 $d/Current'
>> alias R2.14='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln 
>> -s $d/2.14 $d/Current'
>>
>
> Try
>
> ln -sfn 2.13 /Library/Frameworks/R.framework/Versions/Current
>
> You'll need to be admin of the computer, otherwise you'll need sudo or change 
> permissions. Note that for symlinks you'll need extra -h in chown otherwise 
> you're changing ownership of the target not the link. If in doubt (ie., you 
> messed with permissions before), run sudo chmod g+w -R 
> /Library/Frameworks/R.framework
>
> Cheers,
> Simon
>
>
>> On executing R2.13 in the terminal, I get:
>> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
>> ln: /Library/Frameworks/R.framework/Versions/Current/2.13: Permission denied
>>
>> If I chown Current, I still get:
>> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
>>
>> I (bad) solution is to put in "sudo" in the alias...
>>
>> How is it done correctly?
>>
>> Cheers,
>>
>> Marius
>>
>> PS: I also posted it for future reference, I've only found the idea of using 
>> ln -s on the help pages/FAQ, but not how to get around the permission issue.
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>>
>
> ___
> R-SIG-Mac mailing list
> R-SIG-Mac@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2011-10-11 Thread Simon Urbanek

On Oct 11, 2011, at 6:24 AM, Marius Hofert wrote:

> Hi,
> 
> I have multiple R versions installed and would like to switch between them 
> via setting the symblic link "Current". To make this a bit more convenient, I 
> defined two "aliases" in .bashrc:
> 
> alias R2.13='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln -s 
> $d/2.13 $d/Current'
> alias R2.14='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln -s 
> $d/2.14 $d/Current'
> 

Try

ln -sfn 2.13 /Library/Frameworks/R.framework/Versions/Current

You'll need to be admin of the computer, otherwise you'll need sudo or change 
permissions. Note that for symlinks you'll need extra -h in chown otherwise 
you're changing ownership of the target not the link. If in doubt (ie., you 
messed with permissions before), run sudo chmod g+w -R 
/Library/Frameworks/R.framework

Cheers,
Simon


> On executing R2.13 in the terminal, I get:
> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
> ln: /Library/Frameworks/R.framework/Versions/Current/2.13: Permission denied
> 
> If I chown Current, I still get:
> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
> 
> I (bad) solution is to put in "sudo" in the alias... 
> 
> How is it done correctly? 
> 
> Cheers,
> 
> Marius
> 
> PS: I also posted it for future reference, I've only found the idea of using 
> ln -s on the help pages/FAQ, but not how to get around the permission issue.
> ___
> R-SIG-Mac mailing list
> R-SIG-Mac@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 
> 

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2011-10-11 Thread Martin Ellis
Ah, I see.
On my system, I'm able to create a symlink within
/Library/Frameworks/R.framework/Versions -- the directory is owned by
user "root", group "admin", and my user account is also in group
"admin".

Hope that helps...

Cheers,
Martin

On 11 October 2011 11:46, Marius Hofert  wrote:
> Hi Martin,
>
> thanks, but I'm aware of that. I was looking for the command-line approach :-)
>
> Cheers,
>
> Marius
>
>
> On 2011-10-11, at 12:43 , Martin Ellis wrote:
>
>> I'm not sure if you're already aware of RSwitch (available at
>> http://r.research.att.com/), but it seems like it might be useful for
>> what you're trying to do.
>>
>> Cheers,
>> Martin
>>
>>
>> On 11 October 2011 11:24, Marius Hofert  wrote:
>>> Hi,
>>>
>>> I have multiple R versions installed and would like to switch between them 
>>> via setting the symblic link "Current". To make this a bit more convenient, 
>>> I defined two "aliases" in .bashrc:
>>>
>>> alias R2.13='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln 
>>> -s $d/2.13 $d/Current'
>>> alias R2.14='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln 
>>> -s $d/2.14 $d/Current'
>>>
>>> On executing R2.13 in the terminal, I get:
>>> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
>>> ln: /Library/Frameworks/R.framework/Versions/Current/2.13: Permission denied
>>>
>>> If I chown Current, I still get:
>>> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
>>>
>>> I (bad) solution is to put in "sudo" in the alias...
>>>
>>> How is it done correctly?
>>>
>>> Cheers,
>>>
>>> Marius
>>>
>>> PS: I also posted it for future reference, I've only found the idea of 
>>> using ln -s on the help pages/FAQ, but not how to get around the permission 
>>> issue.
>>> ___
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac@r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>
>
>
>

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2011-10-11 Thread Marius Hofert
Hi Martin,

thanks, but I'm aware of that. I was looking for the command-line approach :-)

Cheers,

Marius


On 2011-10-11, at 12:43 , Martin Ellis wrote:

> I'm not sure if you're already aware of RSwitch (available at
> http://r.research.att.com/), but it seems like it might be useful for
> what you're trying to do.
> 
> Cheers,
> Martin
> 
> 
> On 11 October 2011 11:24, Marius Hofert  wrote:
>> Hi,
>> 
>> I have multiple R versions installed and would like to switch between them 
>> via setting the symblic link "Current". To make this a bit more convenient, 
>> I defined two "aliases" in .bashrc:
>> 
>> alias R2.13='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln 
>> -s $d/2.13 $d/Current'
>> alias R2.14='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln 
>> -s $d/2.14 $d/Current'
>> 
>> On executing R2.13 in the terminal, I get:
>> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
>> ln: /Library/Frameworks/R.framework/Versions/Current/2.13: Permission denied
>> 
>> If I chown Current, I still get:
>> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
>> 
>> I (bad) solution is to put in "sudo" in the alias...
>> 
>> How is it done correctly?
>> 
>> Cheers,
>> 
>> Marius
>> 
>> PS: I also posted it for future reference, I've only found the idea of using 
>> ln -s on the help pages/FAQ, but not how to get around the permission issue.
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>> 

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

2011-10-11 Thread Martin Ellis
I'm not sure if you're already aware of RSwitch (available at
http://r.research.att.com/), but it seems like it might be useful for
what you're trying to do.

Cheers,
Martin


On 11 October 2011 11:24, Marius Hofert  wrote:
> Hi,
>
> I have multiple R versions installed and would like to switch between them 
> via setting the symblic link "Current". To make this a bit more convenient, I 
> defined two "aliases" in .bashrc:
>
> alias R2.13='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln -s 
> $d/2.13 $d/Current'
> alias R2.14='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln -s 
> $d/2.14 $d/Current'
>
> On executing R2.13 in the terminal, I get:
> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
> ln: /Library/Frameworks/R.framework/Versions/Current/2.13: Permission denied
>
> If I chown Current, I still get:
> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
>
> I (bad) solution is to put in "sudo" in the alias...
>
> How is it done correctly?
>
> Cheers,
>
> Marius
>
> PS: I also posted it for future reference, I've only found the idea of using 
> ln -s on the help pages/FAQ, but not how to get around the permission issue.
> ___
> R-SIG-Mac mailing list
> R-SIG-Mac@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac