This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for scoring raw, parsed data | |
score_symbol_search <- function(df) { | |
scored <- df %>% mutate(accuracy = ifelse(user_response == correct_response,1,0)) | |
return(scored) | |
} | |
# for summarizing scored data | |
summary_symbol_search <- function(df, group_var) { | |
TASK_NAME <- "SYMBOL_SEARCH" | |
summary.df <- df %>% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for scoring raw, parsed data | |
score_dot_memory <- function(df, square_size=5) { | |
scored <- df %>% | |
separate(dot_locations, c("dot1","dot2","dot3"), " ", convert=T) %>% | |
separate(dot1, c("dot1_rx", "dot1_ry"), "_", convert=T) %>% | |
separate(dot2, c("dot2_rx", "dot2_ry"), "_", convert=T) %>% | |
separate(dot3, c("dot3_rx", "dot3_ry"), "_", convert=T) %>% | |
separate(user_answers, c('user_dot1', "user_dot2", "user_dot3"), " ", convert=T) %>% | |
separate(user_dot1, c("user_dot1_rx", "user_dot1_ry"), "_", convert=T) %>% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for scoring raw, parsed data | |
score_color_dots <- function(df, threshold=75){ | |
scored <- df %>% | |
separate(Loc1, into=c("Loc1_x", "Loc1_y"), " ", convert=T) %>% | |
separate(Loc2, into=c("Loc2_x", "Loc2_y"), " ", convert=T) %>% | |
separate(Loc3, into=c("Loc3_x", "Loc3_y"), " ", convert=T) %>% | |
separate(ProbedLocation, into=c("probe_x", "probe_y"), " ", convert=T) %>% | |
separate(FinalLocation, into=c("final_x", "final_y"), " ", convert=T) %>% | |
mutate(stage1.loc1_distance = distance(Loc1_x, probe_x, Loc1_y, probe_y), | |
stage1.loc2_distance = distance(Loc2_x, probe_x, Loc2_y, probe_y), |