Skip to Content
R Packages
book

R Packages

by Hadley Wickham
March 2015
Intermediate to advanced content levelIntermediate to advanced
202 pages
4h 23m
English
O'Reilly Media, Inc.
Content preview from R Packages

Chapter 13. Git and GitHub

If you’re serious about software development, you need to learn about Git. Git is a version control system, a tool that tracks changes to your code and shares those changes with others. Git is most useful when combined with GitHub, a website that allows you to share your code with the world, solicit improvements via pull requests, and track issues. Git/GitHub is the most popular version control system for developers of R packages (witness the thousands of R packages hosted on GitHub).

Git and Github are generally useful for all software development and data analysis, not just R packages. I’ve included it here because it is so useful when you’re making a package. There’s no way I could be as productive without Git and GitHub at my back, enabling me to rapidly spot mistakes and easily collaborate with others.

Why use Git/GitHub?

  • It makes sharing your package easy. Any R user can install your package with just two lines of code:

    install.packages("devtools")
    devtools::install_github("username/packagename")
  • GitHub is a great way to make a bare-bones website for your package. Readers can easily browse code and read documentation (via Markdown). They can report bugs, suggest new features with GitHub issues, and propose improvements to your code with pull requests.

  • Have you ever tried to collaboratively write code with someone by sending files back and forth via email or a Dropbox folder? It takes a lot of effort just to make sure that the two of you ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

R Packages, 2nd Edition

R Packages, 2nd Edition

Hadley Wickham, Jennifer Bryan
Nonparametric Hypothesis Testing: Rank and Permutation Methods with Applications in R

Nonparametric Hypothesis Testing: Rank and Permutation Methods with Applications in R

Stefano Bonnini, Livio Corain, Marco Marozzi, Luigi Salmaso

Publisher Resources

ISBN: 9781491910580Errata Page