organizeIconGroupings: Organize Icon Group Mappings for Every Subject

Description Usage Arguments Value Examples

View source: R/iconPrefs.R

Description

This function maps the group-icon information for each subject with the difference in their icon preference from before the choice task and after. It calls the functions getGroupInfo and getIconDiffs.

Usage

1
organizeIconGroupings(rawChoiceDF, processedRatingDF, side = FALSE)

Arguments

rawChoiceDF

The output of readChoices.

processedRatingDF

The output of processRatingsData.

side

Logical: TRUE and the difference will be categorized by the side the icon appeared on the screen. FALSE and it won't be. Default is FALSE.

Value

A dataframe with the subject-specific mean rating for each icon class (corresponding to the PRPT task) as well as the EU and difference in preference over time.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#RJTRJTRJT is the subject name for this example. It is set up this in the example
#since the function is built for bactch processing and parses the subject ID out
#of the file path which is nine characters.
choice <- base::list("Path File/choice/RJTRJTRJTchoice.txt.txt" = sampleChoiceData)
rate <- sampleRatingsData %>%
 processRatingsData() %>%
 #add the picture 7006 to prevent error since new cohort didn't rate it.
 dplyr::add_row(round = 00, picture = "7006",
                question = "negative", rating = 1.73913) %>%
 dplyr::add_row(round = 01, picture = "7006",
                question = "positive", rating = 2.630435) %>%
 regSetup() %>%
 dplyr::mutate(subject = "RJTRJTRJT", .before = IAPS)
organizeIconGroupings(choice, rate)

jdtrat/iapsr documentation built on Oct. 2, 2021, 12:36 a.m.