[R] Associate a .R file with the RGui
Amarjit Chandhial
@@ch@ndh|@| @end|ng |rom bt|nternet@com
Sun Nov 6 09:17:21 CET 2022
David,
Thanks.
Amarjiit
> On 6 Nov 2022, at 00:40, David Winsemius <dwinsemius using comcast.net> wrote:
>
>
>> On 11/5/22 09:58, Amarjit Chandhial via R-help wrote:
>> Hi Jeff,
>>
>>
>> Please see my original question.
>
> You were told that RGui is not an editor.
>
> Are you implying that your initial message contained an implicit request for instructions on how to get R code in an .R file to be opened automagically when double-clicked or to have "open in <some editor>" appear when right-clicked? (I didn't see that clearly expressed.)
>
> If you want something else to happen with a file that has a .R extension when double-clicked or right-clicked in a GUI file manager, then you need to configure your OS to do whatever else it is that you expect. This is not really an R question. It's an OS question. There are many editors that can also bring up R consoles when the right key combo is pressed. They do require some study for their specific actions, but this is not really the place to get guidance on the fine details.
>
> --
>
> David.
>
>>
>>
>> Thanks,
>> Amarjiit
>>
>>
>>
>>> On 5 Nov 2022, at 15:03, Jeff Newmiller <jdnewmil using dcn.davis.ca.us> wrote:
>>>
>>> RGui is not an editor. It is a console (aka REPL, https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop).
>>>
>>> When using RGui, it is up to you to edit your R file in an external editor like Notepad++ and copy paste code snippets or use source("yourfile.R") as desired.
>>>
>>>> On November 5, 2022 6:47:54 AM PDT, Amarjit Chandhial via R-help <r-help using r-project.org> wrote:
>>>>
>>>>
>>>>
>>>> Hi Andrew/Petr,
>>>>
>>>>
>>>> Thanks for the replies.
>>>>
>>>> In R Console if I run:
>>>>
>>>> R.home("bin")
>>>>
>>>> I get the following
>>>>
>>>> "C:/PROGRA~1/R/R-42~1.2/bin/x64"
>>>>
>>>> which is where
>>>>
>>>> Rgui.exe is (within the x64 folder there are 13 files in total: 8 . exe
>>>> and 5 .dll).
>>>>
>>>>
>>>> In file Explorer if I right-click on a .R file -> Open With -> R for
>>>> Windows GUI Front-End
>>>>
>>>> RGui (64-bit) opens but the .R file does not appear in the editor.
>>>>
>>>>
>>>> Amarjit
>>>>
>>>>
>>>> ------ Original Message ------
>>>> From: "Andrew Simmons" <akwsimmo using gmail.com>
>>>> To: "Amarjit Chandhial" <a.chandhial using btinternet.com>
>>>> Cc: "R-help Mailing List" <r-help using r-project.org>
>>>> Sent: Friday, 4 Nov, 2022 At 09:08
>>>> Subject: Re: [R] Associate a .R file with the RGui
>>>>
>>>> In an R session, run this:
>>>>
>>>> writeLines(normalizePath(R.home("bin")))
>>>>
>>>>
>>>> Right click your .R file > Open with > Choose another app > Check the
>>>> box "Always use this app to open .R files" > Look for another app on
>>>> this PC
>>>> Paste the directory found above, then select "Rgui.exe"
>>>>
>>>>
>>>> On Fri, Nov 4, 2022, 04:49 Amarjit Chandhial via R-help
>>>> <r-help using r-project.org <mailto:r-help using r-project.org> > wrote:
>>>>
>>>> Hi,
>>>>
>>>>
>>>> My OS is Windows 11 Pro 64-Bit, I have R 4.2.2 and RStudio installed.
>>>>
>>>> If I double-click on a .R file in File Explorer the OS gives me the
>>>> option of opening the .R in RStudio, or Look for an app in the
>>>> Microsoft
>>>> Store, or More Apps. Similarly with a right-click.
>>>>
>>>> I would like to associate a .R file with the RGui, not RStudio, thus
>>>> when I double-click on a .R file in File Explorer the .R file opens in
>>>> the R Editor in RGui.
>>>>
>>>> On my PC R 4.2.2 is located in "C:/Program Files/R/R-4.2.2/etc"
>>>>
>>>> Please can someone provide step-by-step instructions on how to
>>>> associate?
>>>>
>>>>
>>>> thanks,
>>>> Amarjit
>>>>
>>>> [[alternative HTML version deleted]]
>>>>
>>>> ______________________________________________
>>>> R-help using r-project.org <mailto:R-help using r-project.org> mailing list -- To
>>>> UNSUBSCRIBE and more, see
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> <https://stat.ethz.ch/mailman/listinfo/r-help>
>>>> PLEASE do read the posting guide
>>>> http://www.R-project.org/posting-guide.html
>>>> <http://www.R-project.org/posting-guide.html>
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>
>>>>
>>>>
>>>>
>>>> [[alternative HTML version deleted]]
>>>>
>>>> ______________________________________________
>>>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>>> and provide commented, minimal, self-contained, reproducible code.
>>> --
>>> Sent from my phone. Please excuse my brevity.
>> ______________________________________________
>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list