Learn R Programming

ILSAmerge (version 1.2.5)

addSchools: 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)

Value

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

Arguments

inputdir

a string indicating the path were ILSAmerge files are stored.

outputdir

a string indicating where the combined data will be saved.

quiet

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

Examples

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

# Path were 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")

Run the code above in your browser using DataLab