match_subIDs_names: Add subject IDs to data which only contain subject's names by...

View source: R/match_subIDs_names.R

match_subIDs_namesR Documentation

Add subject IDs to data which only contain subject's names by matching names from tracker

Description

Some data only has subject names like the MasterData tab of the NeuroMAP Master spreadsheet and the Screener. In order to map their screening psychopathology scores like AI, SPIN, PAI-BOR the subject IDs for S3 task analysis, use this script to match the name in the tracker and pull the corresponding subjectID from there.

Usage

match_subIDs_names(
  tracker_df,
  addto_df,
  col_first_name = "FIRSTNAME",
  col_last_name = "LASTNAME"
)

Arguments

tracker_df

entire filepath to a downloaded copy of NeuroMAP Master UNC.xlsx

addto_df

can be entire filepath to the downloaded coup of screener or if you want to add subjectIDs to the MasterData tab in the Master spreadsheet, simply mention "MasterData". default set to "MasterData".

col_first_name

name of the column which contains the first name of the subject to match between the tracker and master/screener. default set to "FIRSTNAME" (column in MasterData).

col_last_name

name of the column which contains the last name of the subject to match between the tracker and master/screener. default set to "LASTNAME" (column in MasterData).

Value

addto_df dataframe with ID column added in by matching names from study tracker

Author(s)

Nidhi Desai

Examples

## Not run: 
  match_subIDs_names(tracker_df, master_df, col_first_name = "FIRSTNAME", col_last_name = "LASTNAME")
  match_subIDs_names(tracker_df, screener_df, col_first_name = "ContactForm_1", col_last_name = "ContactForm_2")

## End(Not run)


PennStateDEPENdLab/dependlab documentation built on April 10, 2024, 5:15 p.m.