Recently Published
Intro to DV with R Spring 2025
In this R Notebook, we worked with the mtcars dataset to practice basic data analysis and plotting. First, we loaded the tidyverse packages and looked at the first few rows of the data to understand what we were working with. Then we changed a couple of columns (like cyl and am) into factors so they would work better for graphs.
After that, we made several plots using ggplot2. We created a scatter plot to show the relationship between car weight and MPG, a line graph of MPG across the dataset, and a bar chart showing the average horsepower for each cylinder group. Finally, we made a stacked bar chart that compared average MPG, displacement, horsepower, and weight by cylinder count.
Overall, the goal was just to explore the dataset and learn how to make different types of visualizations in R.