load.caps.data {heR.ActivityData}R Documentation

Load CARB Activity Pattern Data from ASCII Files

Description

This function creates global dataframe objects after parsing the California Air Resources Board (CARB) ASCII activity pattern data for the adults/youth and children studies (both main and diary files for each study). The resulting dataframe objects contain the same variable names and labels as are in the original hardcopy codebooks.

Usage

load.caps.data(i)

Arguments

i character vector containing keywords corresponding to the data files to load: "adult.main", "adult.diary", "child.main", "child.diary"

Details

This function uses read.fwf and read.fwf.mult to read the fixed-width format ASCII files for the adult+youth and children activity pattern studies sponsored by CARB. The variable names and variables labels are included in the dataframes as typed in from the original codebooks. In the future, variable value labels (i.e., factors or value.label attributes) will be included.

Disclaimer: These dataframes have undergone a cursory check, but have not yet undergone comprehensive quality assurance due to the large number of variables (as of heR.ActivityData version 0.0.1) If you find an obvious error or discrepancy with published results, please contact the author of this package (see below).

Value

Global dataframe objects are created for each type of data specified in i.

Note

You do not have to use this function to access the CARB activity pattern data, since it is already included in the heR.ActivityData package. The function is provided so that errors in parsing the data can be easily identified and code to assign variable value labels can be added in the future.

Author(s)

Neil Klepeis
nklepeis@uclink.berkeley.edu

References

Please consult the references given in CARB.Data for more information on the CARB activity pattern studies and data formats.

See Also

CARB.Data


[Package heR.ActivityData version 0.0.3 Index]