Skip to main content

Happy Git and GitHub for the useR

Table of contents

  • Let’s Git started
  • 1 Why Git? Why GitHub?
  • 2 Contributors
  • 3 Workshops
  • Installation
  • Half the battle
  • 4 Register a GitHub account
  • 5 Install or upgrade R and RStudio
  • 6 Install Git
  • 7 Introduce yourself to Git
  • 8 Install a Git client
  • Connect Git, GitHub, RStudio
  • Can you hear me now?
  • 9 Personal access token for HTTPS
  • 10 Set up keys for SSH
  • 11 Connect to GitHub
  • 12 Connect RStudio to Git and GitHub
  • 13 Detect Git from RStudio
  • 14 RStudio, Git, GitHub Hell
  • Early GitHub Wins
  • Get started with GitHub
  • 15 New project, GitHub first
  • 16 Existing project, GitHub first
  • 17 Existing project, GitHub last
  • 18 Test drive R Markdown
  • 19 Render an R script
  • Git fundamentals
  • Some Git basics
  • 20 Repo, commit, diff, tag
  • 21 Git commands
  • 22 Branches
  • 23 Remotes
  • 24 Refs
  • Remote setups
  • Git remote setups
  • 25 Common remote setups
  • 26 Equivocal remote setups
  • Daily Workflows
  • Useful Git patterns for real life
  • 27 The Repeated Amend
  • 28 Dealing with push rejection
  • 29 Pull, but you have local work
  • 30 Time travel: See the past
  • 31 Fork and clone
  • 32 Get upstream changes for a fork
  • 33 Explore and extend a pull request
  • 34 Make a GitHub repo browsable
  • Activity prompts
  • 35 Clone a repo
  • 36 Create a bingo card
  • 37 Burn it all down
  • 38 Resetting
  • 39 Search GitHub
  • Notes
  • Notes
  • 40 Run a course with GitHub
  • 41 Ideas for content
  • 42 Bookdown cheat sheet
  • Appendix
  • A The shell
  • B Comic relief
  • C Resources
  • D References

View book source

39 Search GitHub

39.1 Basic resources

GitHub searching

  • https://github.com/search/advanced
  • https://help.github.com/articles/searching-code/
  • https://help.github.com/articles/search-syntax/

Read-only mirror of R source by Winston Chang:

  • https://github.com/wch/r-source

Read-only mirror of all packages on CRAN by Gábor Csárdi:

  • https://github.com/cran
  • http://cran.github.io
  • METACRAN

39.2 Use case

What if a function in a package has no examples? Or is poorly exampled? Wouldn’t it be nice to find functioning instances of it “in the wild”?

Via Twitter, Noam Ross taught me a clever way to do such searches on GitHub. Put this into the GitHub search box to see how packages on CRAN use the llply() function from plyr:

"llply" user:cran language:R

Or just click here.

Another example that recently came up on r-package-devel:

How to see lots of examples of roxygen templates?

This search finds >1400 examples of roxygen templates in the wild:

https://github.com/search?q=man-roxygen+in%3Apath&type=Code&ref=searchresults

38 Resetting
Notes

On this page

  • 39 Search GitHub
  • 39.1 Basic resources
  • 39.2 Use case
  • View source
  • Edit this page

"Happy Git and GitHub for the useR" was written by Jenny Bryan, the STAT 545 TAs, Jim Hester.

This book was built by the bookdown R package.