Opens a connection to a High School & Beyond 1980–1986 Senior cohort data file and
returns an edsurvey.data.frame
with
information about the file and data.
Usage
readHSB_Senior(
HSR8086_PRI_FilePath,
HSR8086_SASSyntax_Path,
forceReread = FALSE,
verbose = TRUE
)
Arguments
- HSR8086_PRI_FilePath
a character value to the main study-derived analytical data file (HSR8086_REV.PRI). Located within the
REVISED_ASCII
Folder.- HSR8086_SASSyntax_Path
a character value to the SAS syntax file for parsing the
HSR8086_REV.PRI
data file. Located within theSAS_EXTRACT_LOGIC
Folder.- forceReread
a logical value to force rereading of all processed data. The default value of
FALSE
will speed up the read function by using existing read-in data already processed.- verbose
a logical value that will determine if you want verbose output while the
readHSB_Senior
function is running to indicate processing progress. The default value isTRUE
.
Details
Reads in the specified HSR8086_SASSyntax_Path
file to parse
the HSR8086_PRI_FilePath
file.
A cached data file and metadata file will be saved in the same
directory and filename as the HSR8086_PRI_FilePath
file,
having new file extensions of .txt and .meta, respectively.
Please note the original source repcode
variable has been split
into two variables named repcode_str
for the stratum value
and repcode_psu
for the primary sampling unit (PSU) value in the resulting
cache data.
See also
readECLS_K2011
, readNAEP
, and getData
Examples
if (FALSE) { # \dontrun{
wrkFld <- "~/HSB/SENIOR"
dataPath <- file.path(wrkFld, "REVISED_ASCII", "HSR8086_REV.PRI")
sasPath <- file.path(wrkFld, "SAS_EXTRACT_LOGIC", "HSBsr_READ_HSR8086.SAS")
# with verbose output as default
hsbSR <- readHSB_Senior(dataPath, sasPath)
# silent output
hsbSR <- readHSB_Senior(dataPath, sasPath, verbose = FALSE)
# force cache update
hsbSR <- readHSB_Senior(dataPath, sasPath, forceReread = TRUE)
} # }