This function collates and performs initial cleaning of raw data from the SEMA smartphone app.
1 2 | clean_sema(input, rt.trim = FALSE, rt.min = 500, rt.threshold = 0.5,
na.value = NULL)
|
input |
The file path to the folder containing your sema data files. Important that this is the folder, not a specific file. |
rt.trim |
Whether to remove responses that are below the rt.min threshold on reaction time. If this is TRUE, first, surveys with more responses below rt.min (default 500ms) than the allowed rt.threshold (default .5 or 50 Then, individual responses below the reaction time threshold from remaining surveys will be replaced with NA values. |
rt.min |
The reaction time threshold below which response times are considered invalid (if rt.trim = TRUE). |
rt.threshold |
The proportion of too-fast responses (faster than rt.min) before a survey is replaced with missing values (only active if rt.trim is set to TRUE) |
na.value |
By default this is NULL, which means that missing data will be saved as NA, which is the default in R (and is read nicely by SPPS, I believe). If you wish to set missing values to something particular like -99, for instance, you would set na.value = -99 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.