addSchools: Add school data

View source: R/addSchools.R

addSchoolsR Documentation

Add school data

Description

Add school data to student and teacher files merged by ILSAmerge. It will run combineStudents internally. To see which ILSA are available for adding school data use availableILSA.

Usage

addSchools(inputdir = getwd(), outputdir = getwd(), quiet = FALSE)

Arguments

inputdir

a string indicating the path where ILSAmerge files are stored.

outputdir

a string indicating where the combined data will be saved.

quiet

a logical value indicating if progress status should be shown. Default is FALSE.

Value

Saves combined student data and teacher data with added school data.

Examples

# Path where raw 'SPSS' files are
input <- system.file("extdata/timssadv", package = "ILSAmerge")

# Path where merged files will be saved
dir.create(file.path(tempdir(),"addSchools"))
output <- file.path(tempdir(),"addSchools")

# Merging 'TIMSS' Advanced 1995, as .rds file
ILSAmerge(inputdir = input, outputdir = output, filetype = "rds", quiet = FALSE)

# Check file names
list.files(output,pattern = ".rds")

# Add school data
addSchools(inputdir = output, outputdir = output)

# Check file names
list.files(output,pattern = ".rds")


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