I want to be able to save my R code with two different extensions:
- ".R" for R code that will be incorporated into R packages
- ".Rscript" for R code that is meant to be used in a semi-interactive manner when I am sitting at the computer doing things
When I try to save files with the ".Rscript" extension, I get warning messaging asking if I want to "confirm change file type". If I confirm this change, the file saves as expected, but the code/text is treated as plain text and loses all of the editor theme colors.
Is there a way to associate custom file extensions with RStudio so that files with the ".Rscript" extension will be treated as code and colored appropriately? Thanks.