Base R is a Thing
Create Plots in Base R
Use the file AlcoholConsumption.csv
to create three plots such that two are misleading or misrepresent the data while the other is indicative of what the data truly is. You are asked to stick to Base R even if you have working knowledge of tidyverse
commands, though this is not a requirement. Please submit this as a single R script replacing only the areas that ask you to do so.
# Replace this with your name
# Misleading/misrepresented 1 ----
## Put your entire code for the plot under this line ----
# ~ Replace this with a basic explanation of why it is misleading and/or misrepresented ----
# --
# Misleading/misrepresented 2 ----
## ## Put your entire code for the plot under this line ----
# ~ A basic explanation of why it is misleading and/or misrepresented ----
# --
# True version ----
## ## Put your entire code for the plot under this line ----
# ~ A basic explanation of why it is misleading and/or misrepresented ----
Notice that there are four dashes (----
) after the text in every #
except on the line where you should place your name. This provides a nested outline of your script that is easier to follow, especially if they get long.
There are a few ways to get to your outline. As you transition from a dependence on your mouse/trackpad to the old school keyboard, having a working knowledge of shortcuts creates a less disruptive experience than say having to grab that mouse/trackpad everytime you want to do something other than typing. To access the outline of your sections and subsections within an R script, hold down the keys control shift o1
To learn more about nesting, take a look at this post titled The Little Things.
Please submit your script to eCampus under Week 2 Out of Class Task.
The letter o not zero.↩︎