8.1 Introduction
GitHub is an online platform for hosting and sharing code. More formally it is called a software repository. It is very popular with software developers, especially those creating open-source applications, and has also been adopted whole-hearted by many data scientists and data analysts.
GitHub has many features and uses. One of the most basic ones is to use GitHub like Dropbox to R backup copies of code on GitHub. GitHub also can act like a kind of web server to host websites, online books like this one, and provide access to open source software. Many people working on R packages use GitHub to host their package while its being developed or expanded. When a package is finished, it often is then submitted to CRAN, and the version on GitHub is used as the developement version where new features are being developed and tested.
You can access packages on GitHub to get the newest version before something has been submitted to CRAN, or packages that haven’t or maybe will never end up on CRAN. This book relies on a package I’ve written called wildlifeR for datasets and some functions. In this short exercise we’ll download a package from CRAN we need to interact with GitHub, and then download wildlifeR. We’ll also go to the wildlifeR website to learn more about the package.
8.1.1 Learning objectives
8.1.2 Learning goals
8.1.3 Functions & Arguements
- library
- devtools::install_github
- scatter.smooth
- $
8.1.4 Packages
- devtools
- wildlifeR
8.1.5 Potential hangups
- We’ll use the “$” operator to tell scatter.smooth() what to plot, which is different than how ggpubr and ggplot2 work; sigh…