scoreMcs: Score Multi-dimensional Compassion Scale

Description Usage Arguments Examples

Description

This function can be used to score MCS data that has been downloaded from Qualtrics (manually or via the API - e.g., QualtRics package) and either append it to a <master.csv> file or create a <master.csv> for you. A <master.csv> file is a file in long format that contains multiple timepoints of scored MCS data (e.g., weeks 1-n). If manually downloaded from Qualtrics, it will remove rows 1 and 2. It assumes that the participant ID column is labeled 'ID' and that the MCS columns begin with 'MCS_' (e.g., MCS_1) It assumes that there are 16 columns to remove from the front of the Qualtrics .csv file or dataframe.

Usage

1
2
scoreMcs(tPoint, tPointNum, masterFile, dates = FALSE, QualtRics = FALSE,
  duplicates = FALSE)

Arguments

tPoint

A .csv file or API dataframe with a timepoint's worth of MCS data to score. Use quotes.

tPointNum

Of class character denoting the current timepoint to score. This will add that character to a 'timepoint column.' Use quotes.

masterFile

A .csv file that includes computed MCS scores from all scored timepoints. If this is the first timepoint to score, it will create the master file to the name of your choosing (e.g., masterMCS.csv). Use quotes and a .csv extension.

dates

Defaults to FALSE. Set to TRUE if you'd like the start and end dates/times of survey completion for each participant (in 2 separate columns).

QualtRics

Defaults to FALSE. Set to TRUE if you accessed the data through the QualtRics R package (Qualtrics API). This will read an object of class dataframe and will not remove the first two rows of the dataframe.

Examples

1
2
scoreMcs(tPoint = "SacCCTWeek4.csv", tPointNum = 4, courseName =
"sacAprilJune2016", masterFile = "masterCCTMcs.csv", dates = FALSE, QualtRics = FALSE)

santiallende/caanPackage documentation built on May 29, 2019, 1:47 p.m.