In-class Exercise 1: Now You See It!

Published

January 13, 2024

Modified

January 23, 2024

1 Loading R packages

In this hands-on exercise, two R packages will be used. They are:

The code chunk used is as follows:

pacman::p_load(tidyverse, haven)

2 Importing PISA data

The code chunk below uses read_sas() of haven to import PISA data into R environment.

stu_qqq <- read_sas("../../data/cy08msp_stu_qqq.sas7bdat")
stu_qqq_SG <- stu_qqq %>%
  filter(CNT == "SGP")
write_rds(stu_qqq_SG,"data/stu_qqq_SG.rds")
stu_qqq_SG <- read_rds("data/stu_qqq_SG.rds")