In our last post on Getting Started with Data Visualizations in R, we went over how to start using ggplot2
in R. We learned how to set up a basic scatterplot and how to change the colors of the points via a variety of methods. We also learned how to update our plot for categorical variables, and how to add labels, change fonts, and alter the legend.
Have you ever wondered how to make colorful and interesting plots and charts for data visualization? Today’s post is Part 1 of a two-part series on getting started with data visualizations in R! Throughout this tutorial, we’ll be using ggplot2, a very useful R package that we can use to make some really great and professional-looking plots and figures for visualizing data.
In our previous post on Getting Started with Coding in R (Part 1), we covered how to download and install R and RStudio. In this post, we’ll dive right into coding in R. We’ll do that by quickly building up some skills to complete the following: Write a function to count the total number of heads and tails in a series of coin flips.
Now that we’ve had several posts on getting started with coding in R (see Part 1, Part 2, and More Resources) we’re ready to get started with our first Code Lab! In this post, we’ll see how we can estimate pi with dart throwing in R!