We are going to learn some of the challenges to organizing, summarizing,
synthesizing, and calculating with large amounts of data, but in the end none of
this is going to convince anyone if we cannot communicate what we learn.
You already have the experience that the most powerful tools for
communication are images, pictures, diagrams, ... graphics. This is the reason
that our authors begin with data visualization.
ggplot2 is a package in R that implements the
grammar of graphics, a process of building informative graphics one
layer at a time.
There are more tools in the ggplot2 package than you can learn in one
chapter, but this chapter will show you how to build a variety of practical
graphics.
Some pointers as you get started:
Read the textbook, every line.
Execute each line of code by typing it yourself. Do not simply "copy and
paste" code at the beginning because it seems faster.
Begin to get in the habit of working and saving your work in script (.R)
files, see
homework_01_example.R
in your first homework.
Do each exercise in the textbook and read through each solution in the
exercise solutions manual.
See me during my office hours or make an appointment with me if
you need help getting started, there will be a sharp learning curve, but
I can help you get going.
Assessment deadlines will be 11:59pm each Saturday.
All assessments are submitted to the Homework Folder inside your assigned
Google Drive folder.
There are no make-ups for missed assessments. Contact me before a deadline
if you have an issue meeting the deadline and we will find a mutually
agreeable solution.
Homework
Homework 1 (due Saturday, January 11)
Create an R Script file in RStudio (via File > New File > R Script)
and reproduce the eight plots in Section 1.5 of the
textbook (not counting 1.5.5 Exercises).
Save the eight plots to eight individual files, either .png or .pdf,
your choice.
Make sure that each of the eight plots are an appropriate size for
viewing. Look at the documentation for setting the height and
width in ggsave() with the command ?ggsave().
Submit your R Script file and the eight plots to your Homework
Folder.
A sample script file and sample images from Section 1.4 of the
textbook are provided below.