Create .Rprofile automatically when creating new project


Recently I’ve switched from windows to linux (fedora).
I got used to fset my personal options in .Rprofile, now in linux systems each R project has his own .Rprofile.
I’m afraid I am going to forget to create the file when creating a new project, so I want to know if there is a way to create automatically the .Rprofile (replicating an existing one)


Per the documentation on Startup, you don’t need to have a separate .Rprofile for each project:

So, if you don’t put a .Rprofile in the working directory, then it will check the home directory – or you can set the appropriate environment variable.

That said, it’s worth reading this discussion of what does and doesn’t belong in the .Rprofile, if you haven’t previously:


Here a very useful ressource to understand R startup to add to @nick great answer