In this unit you will learn more about matrices, dataframes,and lists, and how to import, export, and manage data.
Follow the links to each lecture, lab, and reading.
Scroll down to download the SWIRL lessons.
Data for the labs for this unit can be found here
Lecture: Details of dataframes and matrices.
Learning Goals:
SWIRL:
Lab: Unit 2: Lab 1
Reading: Missing Data
Functions: matrix()
, data.frame()
, rbind()
, cbind()
, head()
,tail()
, str()
, is.foo()
, nrow()
, ncol()
, dim()
, rowSums()
, colSums()
, t()
.
Lecture: Subsetting and indexing in R
Learning Goals:
$
, [, 'name']
),[i]
,[i, j]
,>
, <
, !=
, ==
).SWIRL: Indexing and subsetting
Lab: Unit 2: Lab 2
Reading: Healy, K. 2018. The Plain Person’s Guide to Plain Text Social Science Link. Chapter 1. Introduction. (more if you want!)
Functions: order()
, subset()
, [
, [[
, $
Lectures:
Learning Goals:
SWIRL: Importing data
Lab: Unit 2: Lab 3
Best Practice: Managing Data
Functions: read.table()
, read.csv()
, write.table()
Lecture: Understanding and accessing lists
Learning Goals:
list()
,SWIRL: Lists
Lab: Unit 2: Recap
Functions: list()