-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I'm struggling to successfully calculate the accuracy of the flanker trials.
This is the code I'm currently working with:
accuracy %>%
cbind(accuracy, accurate = 0) %>%
for (i in accuracy){
if ((accuracy$response) == (accuracy$center_letter)){
accurate <- 1}
}
I've tried other versions but I frequently get an error which says it can only calculate for the first value which I assume means my loop isn't working correctly.
I've also tried using indexing (ex. accuracy[i,14]), but that produces even more error messages.
I did get the loop to work for the subsequent problem about RT so I think I'm having a misunderstanding about combining a loop and an if/else statement.
Metadata
Metadata
Assignees
Labels
No labels