Skip to content

Wrangling accuracy  #13

@mhorger

Description

@mhorger

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions