Working with Datasets in R swirl
By Caitlin Hicks Pries
This resource is an activity designed to be completed in swirl, an interactive platform for learning and teaching R in the RStudio console. Instructors can learn more about swirl and how to implement a swirl lesson here. Students can complete swirl lessons using RStudio Cloud directly in their browsers - no software installation required.
This lesson is part of a Global Change Biology course where one of the main learning objectives is to have the students develop and answer scientific questions by using R to access, organize, and graph actual long-term data sets. In order to explore global change data and learn how various anthropomorphic activities are affecting ecosystems and species, we need to import datasets into R and make sure all the variables are in the correct format that will allow us to perform data visualization (aka, create graphs). In this lesson, we will learn how to import data into R, perform basic QA/QC (quality assurance/quality control) of the data, and create some basic exploratory graphs of the data from which we can begin to answer scientific questions. We will be working with a dataset from the PRISM Climate Group (http://www.prism.oregonstate.edu/) that includes air temperature and precipitation over the past one hundred years in two towns in the United States (Boulder, CO and Hanover, NH). This resource also includes a graphing homework assignment and key that can be used as an assessment and extension of learning after students complete the swirl lesson.
This 1-hour lesson was designed for an intermediate level Climate Change Biology course for majors.
Pries, C. H. (2019). Working with Datasets in R swirl. Make Teaching with R in Undergraduate Biology Less Excruciating, QUBES Educational Resources. doi:10.25334/Q4KF2V