Data Tidying- with fMRI!
Objectives
This week we’re going to polish off our section on data manipulation by working with fMRI data. First we’ll go over a couple of key functions that are useful for rearranging data into “tidy” format. Then we will download an openly-available fMRI dataset and learn how to load and visualize fMRI data in R. Finally, we’ll apply the skills we’ve learned to combine and wrangle fMRI datasets and to summarize and visualize their results.
Readings
You should read this chapter before you come to class:
- Applied Data Skills - Chapter 8: Data Tidying
Slides
Slides have been adapted from the textbook readings using Claude AI.
In-class exercises
We will follow along with the examples given in the textbook through section 8.4. Create an R project called data-tidy, and save today’s work in a Quarto report called tidy.qmd.
Then we will follow along with a set of exercises to learn about interacting with fMRI data in R. See the haxby01 page for more information about the dataset.
Weekly assignment
Download the fmri-data-wrangling script here. Also, download this csv file that contains summary data for each subject.
Follow the instructions in the script. You will start from the section labeled Start running from here. Below that section, you will find several questions that you will answer using the data and the skills you have learned so far. Respond to the questions by filling in the chunks that say FILL IN HERE.
Final project preparation: Read the paper associated with your final project. Download the data and make sure you are able to load it in to R. Your Quarto document should include the code that you used to load it into R.
When you zip your files to submit your assignment, please do not include the original data files. You should include only the qmd and html report files.