This function reads the GSED fixed administration data from the specified OneDrive path. It processes the data to extract item responses and visit information, renaming columns according to the GSED2 lexicon. The function also applies specific data edits to ensure the integrity of the dataset.
Arguments
- onedrive
The OneDrive path where the data is stored.
- path
The path to the GSED fixed administration data.
- phase
Either 1 or 2, indicating the phase of the GSED data to read. It is important to specify this correctly as it accounts for the different item orders between phase 1 and phase 2 for SF and LF.
Details
Requirements:
You must have access to the OneDrive path where the GSED data is stored.
The
gsedread
package must be installed.The system variable
ONEDRIVE_GSED
must be set correctly.
Note: The file names of the source data are hard-coded within this function.
Examples
onedrive <- Sys.getenv("ONEDRIVE_GSED")
path <- file.path(
"GSED Phase 1 Final Analysis",
"GSED Final Collated Phase 1 Data Files 18_05_22")
phase1 <- read_gsed_fixed(onedrive, path, phase = 1)