New notebook can be created via Rstudio->File->New File->R Notebook. This opens a default notebook with some prefilled texts/chunks.
Earlier I need to edit the default template located at "/Applications/RStudio.app/Contents/Resources/resources/templates" with my edited version of "notebook_osx.Rmd".
I do not see this path in the current version of RStudio [RStudio 2022.12.0+353 Elsbeth Geranium Release]
So where can I edit the default new notebook template to suit my requirements.
This is on the following config.
"RStudio 2022.12.0+353 "Elsbeth Geranium" Release" on "MacOS Monterey"
I don't see an option to do this. Of course, they are embedded somewhere within the /Applications/RStudio.app file tree, but if it were me, I'd use a snippet manager, such as espanso and CMD A insert snip.
Just keeping this here in case it helps other users.
I have a executable that copies my personal & edited "notebook_osx.Rmd" to the path
"/Applications/RStudio.app/Contents/Resources/resources/templates".
In the edited "notebook_osx.Rmd" I have added some chunks, imports libraries I use most often etc.... saves time to retype all the commands !
So every time I create a new R Notebook it opens reformatted as per my edited template.
Can you pls reconfirm on this since my laptop(Mac OSMonterrey) did not have the template folder. I created the folder and saved my edited "notebook_osx.Rmd" in it and it does not load the template.
RStudio still used the "rmd" from the "Application..." folder
I deleted the "notebook.rmd & notebook_osx.Rmd" from "/Applications/RStudio.app/Contents/Resources/resources/templates" and it did not load any template but a blank file.
and saved a copy of the default notebook.Rmd there with a change to the title to show that it had come from that location, rather than the default path