Skip to content

Opening R in 64-bit version by default

11 messages · Josh Browning, Michael Sumner, John C Frain +3 more

#
On May 24, 2011, at 11:03 AM, Josh Browning wrote:

            
Shirley, you don't expect us to read your mind. OS?

--
David Winsemius, MD
West Hartford, CT
#
Oh, of course, sorry.  I'm running Windows 7.  Thanks!

Josh

-----Original Message-----
From: David Winsemius [mailto:dwinsemius at comcast.net] 
Sent: Tuesday, May 24, 2011 11:25 AM
To: Josh Browning
Cc: r-help at r-project.org
Subject: Re: [R] Opening R in 64-bit version by default
On May 24, 2011, at 11:03 AM, Josh Browning wrote:

            
Shirley, you don't expect us to read your mind. OS?

--
David Winsemius, MD
West Hartford, CT
#
On 24/05/2011 1:27 PM, Josh Browning wrote:
Your question is probably a question for Microsoft.  Why doesn't 
whatever you did work?

Someone here might be able to help if you describe what you did.  I just 
tried "Open with..." and selected Rgui.exe from the bin/x64 directory, 
and that failed.   A couple of other things I tried worked:

1.  Edit the registry key

HKEY_CLASSES_ROOT\RWorkspace\shell\open\command

2.  Rename the bin/x64/Rgui.exe file to something else, and ask to open 
with that.

Duncan Murdoch
#
I have no problems configuring .r files to start in Emacs or RStudio
and then use Emacs or RStudio to call the required version of R.

You might check when you open with other from Windows Explorer that
the check box "Always open with this program is ticked.

If you are using Windows 7 you can set an change default programs as follows -
1 open Control Panel
2 click on programs
3 click Default Programs and follow the options to set the required defaults.

 I have never used Vista and dont know if this works in Vista

Best regards

John
On 25 May 2011 01:55, Michael Sumner <mdsumner at gmail.com> wrote:

  
    
#
On 25/05/2011 5:43 PM, John C Frain wrote:
I suspect the latter method will fail, since it's using the same tools 
as "Open with..." uses, and that appears to be buggy.  But I'm on 32 bit 
XP right now, so I can't verify.

Duncan Murdoch
2 days later
#
I have checked my second proposal using Windows 7 and Duncan is
correct in saying that it will not work

.r and .Rdata files were not associated to any version of R in my set
up.  On my system .r files are associated to the editor that I am
using at any particular time.  Currently this is either rStudio or
Emacs and the usual method for switching Windows Explorer's defaults
continues to work for me.

To check my second proposal I associated ,r files to 64-bit R version
2.13.0.  Using the normal method or my second proposal I found that I
could not change the association either to 32-bit R version 2.13.0 or
to 64-bit R version 2.12.2.

At first sight it appears that the association of .r files to 64-bit
R-version 2.13.0 is permanent.  Probably the only way to get rid of
the association would be to delete all keys etc. in the registry that
have a reference to Rgui.exe (after first backing up the registry).  I
changed the name of the 64-bit rgui.exe to rgui.exe.old and tried to
change the association to the 32-bit version. This did not work   My
impression was that Windows was now looking for rgui.exe and could not
find it..

I suspect the following (I anyone knows better please let us know).
When you associate .r to a particular version of rgui.exe does
windows store the name of the program and its location in separate
places.  When you try to change the association to a program with the
same name in a different directory windows is not changing the
directory and therefore does not change the program.  Perhaps this is
due to the minimal interaction between R and the registry.  This
minimal interaction is one of the advantages of R and I would not like
to sacrifice it for the sake of solving the current problem.    I
presume that the problem is the way in which Windows Explorer
interacts with R.

Has anyone experienced a similar problem with other programs such as
emacs if they have installed in a new directory and tried to make new
file associations?

Best Regards

John.
On 25 May 2011 22:53, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:

  
    
#
On 11-05-27 8:20 PM, John C Frain wrote:
No, both the path and name of the program set to handle an association 
are stored in the same registry key.  I think this is likely supposed to 
be a "security feature" in windows, to disallow hijacking of 
associations by malware, but really it's just a bug.

If you manually change that registry key, things are fine.  If you ask 
Windows dialogs to do it for you, it fails.

Most people pay infinitely more to Microsoft for Windows than they pay 
to R Core for R.  I hope that's also the ratio of their complaints to 
Microsoft about this bug to their complaints to us about R.

Duncan Murdoch
#
On May 27, 2011, at 8:56 PM, Duncan Murdoch wrote:

            
Fortune nomination.
#
On Fri, 27 May 2011, David Winsemius wrote:

            
Added on R-Forge.
thx,
Z