'How to make RStudio a default app for Rfiles instead of Notepad?

I need your help on something that is considered "easy" but has troubled me some days now.

Some months ago, something changed on my computer and I couldn't open R files with Rstudio (or even R) but only with Notepad and honestly, this has been very tiring lately.

The thing is that when I select RStudio to open the file instead of Notepad, there is NOT the option to "Always open R files with RStudio" I've also tried to change it through the settings by changing .R files to open with RStudio but the option of .R files doesn't even appear.

Does anyone have any idea of what is going on?

To make it more clear, I simply want to double-click on an R file and instantly open RStudio with the same script.

Thank you all in advance!



Solution 1:[1]

I'd try right clicking on the file, then NOT clicking on Open with... RStudio. Instead, click on "Choose another app"

example of the menu I'm talking about

What options Windows shows for opening a file is a total mystery; if you don't have that context menu available (I actually don't for .R files, I had to right click on a .PNG to get this screenshot example) then make sure whatever option you are clicking on opens up some dialog to chose the program. If the program is just listed in the context menu, clicking on it won't give you an option to change the association.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Azura's Starfish