5

Hi I'm wondering if there is a way to make RStudio's default new R script have a header? I.e. change the script that opens when you press ctrl + shift + n to include text without any other user input.

For example:

## Project:
## Purpose:
## Created By: 
## Created Date: 

I know I can add a snippet with a similar set up as shown in this question Create a default comment header template in R? but I'm hoping there is a way to make all new scripts in RStudio open this by default, similar to the way Spyder defaults to having a "Created on … Author..." at the top of each new script.

The idea being that it is a reminder to myself and other people in the organisation that we require headers on our scripts. Having a snippet makes it easier but doesn't serve as a reminder.

Thanks

Sarah
  • 3,022
  • 1
  • 19
  • 40
  • 2
    Project templates are as close as you're going to come w/o modifying the source of RStudio itself https://rstudio.github.io/rstudio-extensions/rstudio_project_templates.html – hrbrmstr Oct 11 '18 at 01:06
  • It sounds like a reasonable suggestion that sounds straight-forward to implement (never say "easy"). Perhaps you could request it? https://github.com/rstudio/rstudio/issues – r2evans Oct 11 '18 at 01:10

0 Answers0