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:
Read-only mirror of all packages on CRAN by Gábor Csárdi:
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
:
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