The focus of this swirl lesson is to provide scaffolding to help students learn to import data into R from a .csv file. The lesson includes a dataset modified from the Dryad Digital Repository (https://doi.org/10.5061/dryad.6jr5797). Students are required to format the provided .csv file and import the edited file into R by following the lesson. The assessment for this lesson asks for an annotated R script that would allow anyone to upload the table into R studio. This lesson is designed to be completed under an hour (the majority of students took ~20-35 minutes during an implementation of a previous version of this lesson). Modifications and/or additions that include several different issues involved in correctly formatting a data table would be welcome!
A previous version of this lesson (unpublished) was implemented in the classroom using the table from http://www.intro2r.info/unit2/importing-data.html. The main implementation issue for students was not knowing how to change the format of cells in Excel from 'Currency' to 'General'. An overview of basic excel skills was not provided, but would be encouraged before this lesson. The current version of the lesson uses a modified dataset from data dryad (https://doi.org/10.5061/dryad.6jr5797). This final lesson was not implemented in the classroom, but the issues of formatting were seen as a bigger issue for my students in a separate activity where students were required to make their own table in excel to import (the a further assessment step in the course). The powerpoint attached was enough information to guide students to the correct formatting practices. See implementation notes for more details.
Researchers should cite this work as follows: