options(warn = -1)
# Download student file for OECD web
url <- "https://webfs.oecd.org/pisa2018/SPSS_STU_QQQ.zip"
file <- "STU/CY07_MSU_STU_QQQ.sav"
temp <- tempfile()
download.file(url, temp)
file <- unzip(temp, file)
file_dir <- dirname(file)
pisa_2018_students <- foreign::read.spss(file, to.data.frame = TRUE)
base::unlink(temp, recursive = TRUE)
base::unlink(file_dir, recursive = TRUE)
options(warn = 0)
rm(
url,
temp
)
save(pisa_2018_students, file = "data/rdata/pisa_2018_students.Rdata")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.