But really, one is enough. Pick a package from the list below, and use it to do something. If you want to use a package not on this list, that’s also ok, but run it by me first (so that I can confirm it’s not one we introduce in class so far, the goal is to work with a new package).

Package list

Packages on CRAN

These packages can be installed with:

install.packages("PACKAGENAME")

The package manuals are linked below, however developers of the packages might have additional information on the GitHub repo of the package.

Packages GitHub only

These packages can be installed with:

library(devtools)
install_github("USERNAME/PACKAGENAME")

USERNAME refers to the user name of the developer of the package. For example, for the first package listed below, USERNAME is hadley and PACKAGENAME is emo.

The package manuals are linked below, however developers of the packages might have additional information on the GitHub repo of the package.

Getting started

Here are the steps for getting started:

  • Start with an assignment link that creates a repo on GitHub with starter documents: https://classroom.github.com/a/QlPBWkcA
  • Clone this repo in RStudio
  • Make any changes needed as outlined by the tasks you need to complete for the assignment
  • Make sure all your code chunks are informatively named, and these labels re not repeated
  • Periodically commit changes (the more often the better, for example, once per each new task)
  • Push all your changes back to your GitHub repo

and voila, you’re done! Once you push your changes back you do not need to do anything else to “submit” your work. And you can of course push multiple times throughout the assignment. At the time of the deadline we will take whatever is in your repo and consider it your final submission, and grade the state of your work at that time (which means even if you made mistakes before then, you wouldn’t be penalized for them as long as the final state of your work is correct).

Assignment

Install the package you pick. Depending on where the package comes from, how you install the package differs: - If the package is on CRAN (Comprehensive R Archive Network), you can install it with install.packages. - If the package is only on Github (most likely because it is still under development), you need to use the install_github function. See above for details.

Then, load the package. Regardless of how you installed the package you can load it with the library function.

Finally, do something with the package. It doesn’t have to be complicated. In fact, keep it simple. The goal is to try to read and understand the package documentation to be able to carry out a simple task.

Questions

  1. Which package are you using? State the name of the package, whether it was on CRAN or GitHub, and include the code for loading it.
  2. What are you doing with the package? Give me a brief narrative including code and output.

Getting help

Ask your questions on the #questions channel on Slack. If your question is about an error you’re getting, make sure to clearly explain what generated the error as well as what the error says.

You are also welcomed to discuss the homework with each other broadly (no sharing code!) as well as ask questions at office hours.

Academic integrity

This is an individual assignment. You are welcomed to exchange ideas with classmates and ask questions on the getting help channels discussed above however you may not share your text or code answers directly with classmates.

The Duke Community Standard applies and course academic integrity policies apply. Please review them here. Specifically, the note on sharing / reusing code.