Learn R Programming

EdSurvey (version 2.4.0)

readBB_2003: Connect to B&B 1993--2003 Data

Description

Opens a connection to a Baccalaureate & Beyond 1993--2003 data file and returns an edsurvey.data.frame with information about the file and data.

Usage

readBB_2003(
  b03DAS_Filepath,
  b03WEIGHT_FilePath,
  masterTxtFilepath,
  forceReread = FALSE,
  verbose = TRUE
)

Arguments

b03DAS_Filepath

a character value to the main study-derived analytical data file (B03DAS.dat). Located within the ECBW/Data Folder.

b03WEIGHT_FilePath

a character value to the study weight data file (B03WEIGHT.dat). Located within the ECBW/Data Folder.

masterTxtFilepath

a character value of the master format file (master.txt) that contains the metadata for the b03DAS_Filepath and b03WEIGHT_FilePath. Located in the ECBW 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 readBB_2003 function is running to indicate processing progress. The default value is TRUE.

Value

an edsurvey.data.frame for the B&B 1993--2003 longitudinal dataset.

Details

Reads in the specified masterTxtFilepath file to parse the b03DAS_Filepath and b03WEIGHT_FilePath files for the B&B 1993--2003 longitudinal survey to an edsurvey.data.frame. The two created cached data files will be saved in the same directory and filename as the b03DAS_Filepath file, having new file extensions of .txt and .meta.

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