intsvy.select.merge: Select and merge data

View source: R/intsvy.select.merge.R

intsvy.select.mergeR Documentation

Select and merge data

Description

intsvy.select.merge selects and merges data from different international assessment studies. It was developed and it is particularly handy for importing IEA data since original files are organised by instrument, country, grade, etc., in a large number of files. Achievement and weight variabels (all of them) are selected by default.

Usage

intsvy.select.merge(folder = getwd(), countries, student = c(), home, 
    school, teacher, config)

Arguments

folder

Directory path where the data are located. The data could be organised within folders but duplicated files should be avoided.

countries

The selected countries, supplied with the abbreviation (e.g., countries=c("AUT", "BGR") or codes (countries=c(40, 100)). If no countries are selected, all are selected.

student

The data labels for the selected student variables.

home

The data labels for the selected home background variables.

school

The data labels for the selected school variables.

teacher

The data labels for the selected teacher data.

config

Object with configuration of a given study. Should contain the slot 'prefixes' with prefixes of filenames with the student, home, school, and teacher data.

Value

intsvy.select.merge returns a data frame with the selected data from study defined in config file.

See Also

timssg4.select.merge, timssg8.select.merge, pisa.select.merge

Examples

## Not run: 
pirls <- intsvy.select.merge(folder= getwd(),
         countries= c("AUS", "AUT", "AZE", "BFR"), 
         student= c("ITSEX", "ASDAGE", "ASBGSMR"), 
         home= c("ASDHEDUP", "ASDHOCCP", "ASDHELA", "ASBHELA"),
         school= c("ACDGDAS", "ACDGCMP", "ACDG03"), 
         config = pirls_conf)
         
pirls <- intsvy.select.merge(folder= getwd(),
         countries= c(36, 40, 31, 957),
         student= c("ITSEX", "ASDAGE", "ASBGSMR"),
         home= c("ASDHEDUP", "ASDHOCCP", "ASDHELA", "ASBHELA"),
         school= c("ACDGDAS", "ACDGCMP", "ACDG03"),
         config = pirls_conf)
                            
timss8g <- intsvy.select.merge(folder= getwd(), 
           countries=c("AUS", "BHR", "ARM", "CHL"), 
           student =c("BSDGEDUP", "ITSEX", "BSDAGE", "BSBGSLM", "BSDGSLM"),
           school=c("BCBGDAS", "BCDG03"), config = timss8_conf)
           
icils <- intsvy.select.merge(folder= getwd(),
         countries=c("AUS", "POL", "SVK"),
         student =c("S_SEX", "S_TLANG", "S_MISEI"), 
         school =c("IP1G02J", "IP1G03A"),
         config = icils_conf)
         
pisa <- pisa.select.merge(folder= getwd(),
        school.file="INT_SCQ12_DEC03.sav", 
        student.file="INT_STU12_DEC03.sav",
        student= c("ST01Q01", "ST04Q01", "ESCS", "PARED"), 
        school = c("CLSIZE", "TCSHORT"), 
        countries = c("HKG", "USA", "SWE", "POL", "PER"))         

## End(Not run)

intsvy documentation built on Oct. 3, 2023, 1:07 a.m.