Chapter 12 continues on with pipes,
%>%, which we learned more about last chapter. The first half of the chapter has you recreate the “Reshaping data” code using pipes. Then, you are directed to do specific things with the data like create several graphs, filtering/selecting specific data, and saving your plots.
Set working directory, read in data, open and work with R Markdown
Practice coding with pipes
use pipes and
ggplotto make a bar plot
draw conclusions from your data
make a bar chart of means
make a density plot
save your plots
At this point you should be familiar with this step. Set your working directory, save your rmd file, load in the tidyverse, and name the three datasets we need when working with the AQ. Complete 12.1.1.
Complete 12.1.2-12.1.4. This is not asking you to do a lot of work, but it is asking you to try something on your own. Please try this, the point isn’t solving the problem, the point is changing the way you think about coding….as nested rather than argument by argument. It should also demonstrate that using pipes correctly makes your work easier and more clean if you practice. If you have problems try the stackoverflow first, but the answers are always at the bottom of the page.
I hope you have noticed this so far, but if you’ve been too focused on coding up to this point the graphs we’ve made have only been frequency distributions. However, we gotta graph way more than just frequency distributions, so 12.1.5 will show you how to create a bar graph of group means.