Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleAmending functions already written

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 work amend the code from his branch.

Clone the server site package repository

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:

  • Under Repository URL paste or type in the URL you got from GitHub earlier
  • The Project directory name should be the name of the package
  • Choose a location for your project folder/directory
  • Click on the button Create Project to finish

...

Warning
titleGit error for Windows users

If you are developing from a Windows environment you might experience the error shown on the below image. When you click on Git in the window New Project the process stops and the message below is displayed. Follow the below instruction the instructions in the last section on this page to hopefully solve the problem. This worked on the computer with a Windows 7 operating system I tried it out on. There is no guarantee that it will work on other Windows version or even on other Windows 7 machine since the file architecture might be different.

Section

...