[R] Fwd: Opening R in 64-bit version by default

Duncan Murdoch murdoch.duncan at gmail.com
Sat May 28 02:56:04 CEST 2011


On 11-05-27 8:20 PM, John C Frain wrote:
> 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.

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

> 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 25/05/2011 5:43 PM, John C Frain wrote:
>>>
>>> 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
>>
>> 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
>>
>>>
>
>



More information about the R-help mailing list