The below information illustrates the process for the server site package repository only. Follow the same route to clone the client site package repository.
This tutorial focuses on writing packages from scratch. However, to amend a function from a package already written the developer can follow the same route to clone the repository which holds the function and amend the code from his branch. |
This is equivalent to copying over the repository/package, in GitHub, into your local computer where most of your development is going to take place. The version you will have on your computer will be linked to the one on GitHub. Go to the GitHub page of the package and copy the URL on the bottom left corner of the page, under HTTPS clone URL
.
Once you have copied the URL go back to your local computer and start your Rstudio. In your Rstudio go to File
and under that tab select New Project
. A window with the title New Project
will then pop up; in that small window click on Version Control
and then on Git
. Fill in the details required as shown in the below image:
If you are developing from a Windows environment you might experience the error shown on the below image. When you click on |
git.exe
in your C drive, if that is your main drive (you might need to show hidden files and folders!). In the Windows 7 machine I used the file was located under C:\Users\MyUserName\AppData\Git\Gitxxxxxxplentyofnumbers\git.exe. Mark down the location of the file.Tools
, then select Global Options
.Git/SVN
and under Git executable
browse to the location of the git.exe
file and select the file. Click on Apply
and OK
.