Renaming RStudio project under version control

lowndrul picture lowndrul · Feb 7, 2017 · Viewed 7k times · Source

What's the right way to rename an RStudio project (esp., when that project is under version control)?

E.g., I created an RStudio project with version control in "~/myproject". Then I decided I wanted to rename the project to "myproject1". So I

  1. renamed "~/myproject" as "~/myproject1"
  2. renamed "myproject.Rproj" as "myproject1.Rproj"
  3. committed the "rename" changes with git via RStudio.

Everything seems to be fine. But I have a suspicion I'm missing something and that I'm going to be surprised by some project behavior down the line.

Answer

mkhezr picture mkhezr · Sep 9, 2017

If your project is also an R package, you need to edit the DESCRIPTION file and change the value of "Package" property to reflect the new name.