Learn R Programming

EdSurvey (version 2.2.3)

readPIAAC: Connect to PIAAC Data

Description

Opens a connection to a PIAAC data file and returns an edsurvey.data.frame with information about the file and data.

Usage

readPIAAC(path, countries, forceReread = FALSE, verbose = TRUE)

Arguments

path

a character value to the full directory to the PIAAC .csv files and Microsoft Excel codebook

countries

a character vector of the country/countries to include using the three-digit ISO country code. A list of country codes can be found in the PIAAC codebook or https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes. If files are downloaded using downloadPIAAC, a country dictionary text file can be found in the filepath. You can use * to indicate all countries available.

forceReread

a logical value to force rereading of all processed data. Defaults to FALSE. Setting forceReread to be TRUE will cause PIAAC data to be reread and increase processing time.

verbose

a logical value that will determine if you want verbose output while the function is running to indicate the progress. Defaults to TRUE.

Value

an edsurvey.data.frame for a single specified country or an edsurvey.data.frame.list if multiple countries specified

Details

Reads in the unzipped .csv files downloaded from the PIAAC Database using the OECD Repository (http://www.oecd.org/skills/piaac/). Users can use downloadPIAAC to download all required files automatically.

References

Organisation for Economic Co-operation and Development. (2016). Technical report of the survey of adult skills (PIAAC) (2nd ed.). Paris, France: Author. Retrieved from http://www.oecd.org/skills/piaac/PIAAC_Technical_Report_2nd_Edition_Full_Report.pdf

See Also

getData and downloadPIAAC

Examples

Run this code
# NOT RUN {
# The following call returns an edsurvey.data.frame to PIAAC for Canada
can <- readPIAAC("C:/PIAAC", countries = "can")

# Extract a data.frame with a few variables
gg <- getData(can, c("c_d05","ageg10lfs"))  
head(gg)

# Conduct a preliminary analysis on the edsurvey.data.frame
edsurveyTable(~ c_d05 + ageg10lfs, data = can)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab