![]() ![]() Then go to GitHub and create a project with thte same name (watch out for the capitalisation) as your new RStudio project, but do *not* check any of the initialisation checkboxes, but create an empty project. Setting this up requires RStudio to restart. Now, we turn on the versioning system by Tools -> Versioning System -> Project Setup -> Git/SVN and there we choose Git as versioning system. After the project was opened, we should see the project Name written in the upper right corner of our RStudio instance. First, we open our new project (Upper right corner, Open project ). For that, we turn on the versioning control for the project. This creates a new project which is, however, not maintined via GitHub or any versioning system. To set the working directory and then create there the package devtools::create("PackageName") I for example manage my packages via GitHub and have a folder called git/ in my home folder, hence, I would type setwd("/home/fischuu/git") Then we set the working directory into the folder to where we would like to create the new R-package. First of all, we need to install the corresponding packages like this install.package("devtools") Creating an R-package with devtools and roxygen2 in RStudio with versioning control in GitHub is fairly easy.
0 Comments
Leave a Reply. |