delete_plabels {gmoTree}R Documentation

Delete participant labels in all apps

Description

If you work with MTurk, the MTurk IDs will be stored in the participant labels variable. This function deletes this variable in all_apps_wide and every app data frame in the list of data frames that was created by import_otree() and/or all variables referring to MTurk, such as participant.mturk_worker_id.

Usage

delete_plabels(oTree, del_plabel = TRUE, del_mturk = TRUE)

Arguments

oTree

A list of data frames that were created by import_otree().

del_plabel

Logical. TRUE if all participant labels should be deleted.

del_mturk

Logical. TRUE if all MTurk variables should be deleted.

Value

This function returns a duplicate of the original oTree list of data frames that do not include the participant labels and/or the MTurk variables.

Examples

# Use package-internal list of oTree data frames
oTree <- gmoTree::oTree

# Show participant labels
oTree$all_apps_wide$participant.label
oTree$survey$participant.label

# Delete all participant labels
oTree2 <- delete_plabels(oTree)

# Show participant labels again
oTree2$all_apps_wide$participant.label
oTree2$survey$participant.label

[Package gmoTree version 1.0.1 Index]