Learn R Programming

EdSurvey (version 2.4.0)

readHSB_Sophomore: Connect to HS&B Study Sophomore Data

Description

Opens a connection to a High School & Beyond 1980--1992 Sophomore cohort data file and returns an edsurvey.data.frame with information about the file and data.

Usage

readHSB_Sophomore(
  HSO8092_PRI_FilePath,
  HSO8092_SASSyntax_Path,
  forceReread = FALSE,
  verbose = TRUE
)

Arguments

HSO8092_PRI_FilePath

a character value to the main study-derived analytical data file (HSO8092_REV.PRI). Located within the REVISED_ASCII folder.

HSO8092_SASSyntax_Path

a character value to the SAS syntax file for parsing the HSO8092_REV.PRI data file. Located within the SAS_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_Sophomore function is running to indicate processing progress. The default value is TRUE.

Value

an edsurvey.data.frame for the HS&B Sophomore 1980--1992 longitudinal dataset

Details

Reads in the specified HSO8092_SASSyntax_Path file to parse the HSO8092_PRI_FilePath file. A cached data file and metadata file will be saved in the same directory and filename as the HSO8092_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

Run this code
# NOT RUN {
setwd("C:/B&B2003/ecbw/B03")

dasFP <- file.path(getwd(), "Data", "B03DAS.dat")
wgtFP <- file.path(getwd(), "Data", "B03WEIGHT.dat")
mstFP <- file.path(getwd(), "master.txt")

# with verbose output as default
bb2003 <- readBB_2003(dasFP, wgtFP, mstFP)

# silent output
bb2003 <- readBB_2003(dasFP, wgtFP, mstFP, verbose=FALSE)

# force data cache update
bb2003 <- readBB_2003(dasFP, wgtFP, mstFP, forceReread = TRUE)
# }

Run the code above in your browser using DataLab