KentonWhite / ProjectTemplate

A template utility for R projects that provides a skeletal project.
http://projecttemplate.net
GNU General Public License v3.0
623 stars 159 forks source link

.RProj creation #201

Closed rsangole closed 6 years ago

rsangole commented 7 years ago

I'm requesting a feature in the create.project() function that also creates a ProjectName.RProj file (and associated files) to the root folder?

I use ProjectTemplate reguarly now with RStudio, but since the function doesn't create a .RProj itself, it's a two step process for me today - i. Call create.project, and ii. Create a new R project within existing directory.

The advantage of making the work an RStudio project is

  1. Project specific configurations like Code Editing controls, Build tools controls, Git/SVN controls etc
  2. RStudio functionality for loading a new project using the dropdown menu on the top right hand side
KentonWhite commented 7 years ago

@rsangole This sounds like a very nice feature. I don't use RStudio personally but do know that many of our users do. I'm not super familiar with how the .RProj file is supposed to look. Could you start a pull request with a new folder inst/defaults/rstudio that is a copy of inst/defaults/full and then place in that folder the .RProj file you would like and where it should be in the directory structure. We can then modify create.project() so that it takes a rstudio flag.

rsangole commented 7 years ago

Will do, cheers!

rsangole commented 7 years ago

Sent you an email, cheers.

rsangole commented 6 years ago

Hello, following up on this request; lost track of time. (But, the feature is still really useful!)

Hugovdberg commented 6 years ago

Could this be solved by pr #206? Perhaps it should be amended to rename the .rproj file if it exists in the template. Rstudio will always show the directory name as the project name so it isn't technically necessary to rename the file.

Op 27 nov. 2017 05:53 schreef "Rahul S" notifications@github.com:

Hello, following up on this request; lost track of time. (But, the feature is still really useful!)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/johnmyleswhite/ProjectTemplate/issues/201#issuecomment-347078503, or mute the thread https://github.com/notifications/unsubscribe-auth/AGn63ybRHdES_ukyP9bwLkyrQSYeqM1rks5s6kA4gaJpZM4ORYmr .

rsangole commented 6 years ago

Yea, I don't see why not. We can create a default template which hosts a basic .RProj file, and write a small function to rename it to the project name. Fits well within #206 framework.

Hugovdberg commented 6 years ago

I would suggest not to add another builtin template but either leave it up to the user to create his or her own custom template if an .Rproj file is necessary, or always add the .Rproj to the full template. The main advantage of putting it in the custom template is that we avoid discussions on whether we want 2, 4 or 8 spaces by default, want to add a new line at the end of the file if it's missing, remove spaces or not..

rsangole commented 6 years ago

That's fair, and it solves the problem at hand.