One-step solution

knitr::opts_chunk$set(
  collapse = TRUE
)
library(ILSAmerge)

We can also combine all the steps for preparing ILSA data (downloading, merging, combining respondents, and renaming) with the function ILSAready():

unlist(file.path(tempdir(),"rlii1991"),recursive = TRUE)
dir.create(file.path(tempdir(),"rlii1991"),showWarnings = FALSE)
output <- file.path(tempdir(),"rlii1991")
ILSAready(study = "RLII", year = 1991,outputdir = output, agreeLicense = TRUE)
unlist(file.path(tempdir(),"rlii1991"),recursive = TRUE)

Also if data is already downloaded we can use ILSAreadylocal():

unlist(file.path(tempdir(),"timssadv"),recursive = TRUE)
dir.create(file.path(tempdir(),"timssadv"),showWarnings = FALSE)
output <- file.path(tempdir(),"timssadv")

input <- system.file("extdata/timssadv", package = "ILSAmerge")

ILSAreadylocal(inputdir = input, outputdir = output)
unlist(file.path(tempdir(),"timssadv"),recursive = TRUE)


Try the ILSAmerge package in your browser

Any scripts or data that you put into this service are public.

ILSAmerge documentation built on April 11, 2025, 5:54 p.m.