We are finally at making graphs! It’s definitely nerd shit but whatever!
Chapter 7 of your text starts with a little recap of
dplyr which is the program containing the Wickam 6, so it’d be good to do that. Then proceed onwards
Set up your workspace
mutatevariables from numeric to factor
make a bar plot with
geomfunctions to create layers in
add color to bar plots, name axes, toggle legend
try violin box plot
Read 7.3. Data visualization is important and I think this passage reflects that. We will be working with ggplot throughout the next few units and it’s a bit quirky in that it’s an older function (so pipes don’t work for instance).Please check out this website and click around a bit. It shows you some of what ggplot and r is capable of and provides the general code frameworks for you to create these yourself.
Complete 7.4. It’s basically just loading in all of your data, combining multiple datasets, selecting variables you are interested in, and saving them as an object (dataframe) you we can easily work with.
Complete 7.5, it hits on something super important when working with ggplot compared to other programs we might use to make plots. If you see in the tibble displayed in 7.5 all variables are numeric……but R uses different labels for numbers like dbl (for whole numbers) and factor for variables describing different groups or categories. Using the
mutate function helps us out with this. Ggplot hates when you try to use numeric instead of factors so again, be super purposeful in the creation of you dataframes.