Learn R Programming

EdSurvey (version 2.4.0)

readBB_2001: Connect to B&B 2000--2001 Data

Description

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

Usage

readBB_2001(
  b01DER_Filepath,
  b01WT_FilePath,
  masterTxtFilepath,
  forceReread = FALSE,
  verbose = TRUE
)

Arguments

b01DER_Filepath

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

b01WT_FilePath

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

masterTxtFilepath

a character value of the master format file (master.txt) that contains the metadata for the b01DER_Filepath and b01WT_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_2001 function is running to indicate processing progress. The default value is TRUE.

Value

an edsurvey.data.frame for the B&B 2000--2001 longitudinal dataset.

Details

Reads the masterTxtFilepath file to parse the b01DER_Filepath and b01WT_FilePath files to an edsurvey.data.frame. This function creates two cached data files will be saved in the same directory and filename as the b01DER_Filepath file for the B&B 2000--2001 longitudinal survey. The two cached data files will have file extensions of .txt and .meta.

See Also

readECLS_K2011, readNAEP, and getData

Examples

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

dervFP <- file.path(getwd(), "Data", "B01DER.dat")
wgtFP <- file.path(getwd(), "Data", "B01WT.dat")
mstFP <- file.path(getwd(), "master.txt")

# with verbose output as default
bb2001 <- readBB_2001(dervFP, wgtFP, mstFP)

# silent output
bb2001 <- readBB_2001(dervFP, wgtFP, mstFP, verbose=FALSE)

# force cache update
bb2001 <- readBB_2001(dervFP, wgtFP, mstFP, forceReread = TRUE)
# }

Run the code above in your browser using DataLab