util_fbs_merge_micro: util_fbs_merge_micro: Merge all microstructure data

View source: R/util_fbs_merge_micro.R

util_fbs_merge_microR Documentation

util_fbs_merge_micro: Merge all microstructure data

Description

This function merges the raw microstructure data into databases

Usage

util_fbs_merge_micro(data_path)

Arguments

data_path

(optional) the full path to the directory where the raw Qualtrics database are saved, EXCLUDING the .sav file name (e.g., '.../b-childfoodlab_Shared/Active_Studies/RO1_Brain_Mechanisms_IRB_5357/Participant_Data/untouchedRaw/Qualtrics_Raw/'). If NOT entered, will assume the database is saved in the working directory.

Details

The databases MUST follow the naming convention: PS1_EventLogs_YYYY-MM-DD.txt, PS2_EventLogs_YYYY-MM-DD.txt, PS3_EventLogs_YYYY-MM-DD.txt, and PS4_EventLogs_YYYY-MM-DD.txt. The databases must all be in the SAME directory to be processed if the data_path is not entered and the directory organization does not follow the structure laid out in the DataManual.

Value

A list containing 2 data lists: 1) beh_wide contains - data: data.frame summary metrics in wide format by code, dict: data dictionary with variable descriptions 2) event contains - data: event data by coder and time, dict: data dictionary with variable descriptions

See Also

Raw data is processed using util_fbs_microstructure

Examples

#if in same working directory as data with all data. Note - there is no need to add the COVID protocol (i.e., 'Home' or 'Lab') to file_pattern - these files will be search for automatically:
mciro_merged <- util_fbs_merge_micro(data_path = 'untouchedRaw/Microstructure_Raw/')

## Not run: 



alainapearce/kellertools documentation built on Feb. 25, 2024, 7:16 a.m.