readPIAAC {EdSurvey} | R Documentation |
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,
usaOption = "12_14"
)
Arguments
path |
a character value to the full directory path 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 |
forceReread |
a logical value to force rereading of all processed data.
Defaults to |
verbose |
a logical value that will determine if you want verbose
output while the function is running to indicate the progress.
Defaults to |
usaOption |
a character value of |
Details
Reads in the unzipped .csv files downloaded from the PIAAC dataset using
the OECD repository (https://www.oecd.org/skills/piaac/). Users can use
downloadPIAAC
to download all required files automatically.
Value
an edsurvey.data.frame
for a single specified country or
an edsurvey.data.frame.list
if multiple countries specified
Author(s)
Trang Nguyen
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 https://www.oecd.org/skills/piaac/PIAAC_Technical_Report_2nd_Edition_Full_Report.pdf
See Also
getData
and downloadPIAAC
Examples
## Not run:
# the following call returns an edsurvey.data.frame to PIAAC for Canada
can <- readPIAAC("~/PIAAC/Cycle 1/", countries = "can")
# extract a data.frame with a few variables
gg <- getData(data=can, varnames=c("c_d05","ageg10lfs"))
head(gg)
# conduct an analysis on the edsurvey.data.frame
edsurveyTable(formula=~ c_d05 + ageg10lfs, data = can)
# the following call returns an edsurvey.data.frame to PIAAC for Canada
can <- readPIAAC("~/PIAAC/Cycle 1/", countries = "can", us)
# There are two years of usa data for round 1: 2012-2014 and 2017.
# The user must specify which usa year they want with the optional "usaOption" argument.
# Otherwise, the read function will return usa 2012-2014. See "?readPIACC()" for more info.
# read in usa 2012-2014
usa12 <- readPIAAC("~/PIAAC/Cycle 1",
countries = "usa", usaOption="12_14")
# read in usa 2017
usa17 <- readPIAAC("~/PIAAC/Cycle 1",
countries = "usa", usaOption="17")
# if reading in all piaac data, the user can still specify usa option.
# Otherwise, by default 2012-1014 will be used when reading in all piaac data.
all_piaac <- readPIAAC("~/PIAAC/Cycle 1",
countries = "*", usaOption="17")
## End(Not run)