import_neuromap_self_reports: Imports NeuroMAP Self Report Data from Qualtrics

View source: R/import_neuromap_self_reports.R

import_neuromap_self_reportsR Documentation

Imports NeuroMAP Self Report Data from Qualtrics

Description

This function imports self report data for the NeuroMAP Study from Qualtrics and saves it as separate CSV files based on the specified scales.

Usage

import_neuromap_self_reports(
  info = FALSE,
  stats = FALSE,
  survey_name = "NeuroMAP S2 - Self Report",
  scales = "all",
  include_id = TRUE,
  include_dem = FALSE,
  path = getwd(),
  file_suffix = "",
  file_date = FALSE,
  add_to_envr = FALSE
)

Arguments

info

Logical. If TRUE, displays information about the function and the scales that can be extracted. Additionally, it assigns the global variable scales_to_score with the names of all the scales available for scoring. Default is FALSE.

stats

Logical. If TRUE, displays basic statistics about the self report data, such as the number of entries, the number of completed entries, and the date of the latest entry. Default is FALSE.

survey_name

Character. The name of the survey in Qualtrics. Default is "NeuroMAP S2 - Self Report".

scales

Character or vector of characters. The scales to extract from the self report data. Available scales are: "iip90" (Inventory for Interpersonal Problems), "ctq" (Childhood Trauma Questionnaire), "panas" (Positive and Negative Affect Schedule), "pid5" (Personality Inventory for DSM-5), "asr" (Adult Self Report), "bpq" (Borderline Personality Questionnaire), "fs" (Flourishing Scale), "dusi" (Short Form Revised Drug Use Screening Inventory), "isc" (Interpersonal Stressors Circumplex), "upps" (Impulsive Behaviors Scale), "bfi" (Big Five Inventory-2), "cts" (Conflict Tactics Scale), and "emotb" (Emotional Trauma Outcome Measures Battery). Default is "all" to include all scales.

include_id

Logical. If TRUE, includes the participant ID in the output files. Default is TRUE.

include_dem

Logical. If TRUE, includes demographic information (e.g., sex, age) in the output files. Default is FALSE.

path

Character. The path where the output files will be saved. If the specified path does not exist, the function will create the directories recursively. Default is the current working directory.

file_suffix

Character. A suffix to add to the output file names. Default is an empty string.

file_date

Logical. If TRUE, appends a timestamp with the format "_ Default is FALSE.

add_to_envr

Logical. If TRUE, returns a list of requested data.frames. Default is FALSE

Author(s)

Zach Vig

Examples

import_neuromap_self_reports(info = TRUE)
import_neuromap_self_reports(scales = c("ctq", "asr"), include_dem = TRUE)
import_neuromap_self_reports(stats = TRUE)
import_neuromap_self_reports(path = "~/my_output_files")
import_neuromap_self_reports(file_suffix = "_v2", file_date = TRUE)

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