In class we developed the package foofactors and showed how to
devtools::create()use_git()fbind() and freq_out(), in the scripts R/fbind.R and R/freq_out.R, respectivelyload_all() to quickly simulate package build + installcheck() to run R CMD checkDESCRIPTION file of package metadatafbind() and freq_out() via roxygen2 commentsuse_package()NAMESPACE file via document()testthat to implement unit testinguse_package() and syntax like otherpkg::foofunction()use_github()README.md that comes from rendering README.Rmd containing actual usage, via use_readme_rmd()use_vignette() and build it via build_vignettes()Consult the repository STAT545-UBC/foofactors for an example repository that you can start with, where all of the above has been done. You are especially encouraged to walk through the commit history and scrutinize the diffs, noticing which files change at each point. You can fork it or use the Download ZIP button to get this as your starting point. Instructions for both are here.
Remember the landing page for all the package material also contains lots of links with extra technical information and general inspiration.
In this homework you will either continue developing the foofactors package or create your own package. If you do the latter, you must hit all the same points but you’ll be starting from scratch.
Aim for the following elements:
check() without errors (warnings and notes are OK, though it would be great if there were none).Ideas for more functions to write:
desc() a la (d)plyrfactor() that sets levels to the order in which they appear in the data, i.e. set the levels “as is”Submit an issue with a link to your package sometime on Friday November 20.
Instructions on how to install a peer’s package from GitHub are here. Use the README.md and the vignette to figure out what the package does and how to use it.
Check minus: Package does not install. Or installation seemed go OK but one or more of the functions don’t work. Or you do something that seems totally natural (probably copied from README.md or vignette) and get odd behavior.
Check: Hits most/all the elements. No obvious technical difficulties. Package pleasant to use. README.md and vignette are pleasant to read and provide accessible examples of usage. No heroic detective work required. Good work!
Check plus: Exceeded the requirements in number of dimensions. Took foofactors farther than was required. Wrote a new package from scratch. Experience of installation and usage was dreamy because of excellent documentation and high functionality. You learned something new from reviewing their work and you’re eager to incorporate it into your work. Wow!
Recall the general homework rubric.