Reply To: Troubleshooting

PennController for IBEX Forums Troubleshooting Reply To: Troubleshooting

#7754
Aref
Participant

Yes, it is attached to “newTrial”. As a matter of fact, it is not my code; it’s the code in the advanced tutorial and template masked priming code. Three days ago I didn’t have this problem. Now I can’t even tidy the advanced tutorial results with the R code that is provided in the tutorial. Here’s the R code:

tidied_results <- results %>%
  filter(PennElementName == "side-by-side" | PennElementName == "selection") %>%
  select(ID, group, item, condition, PennElementName, Value, EventTime) %>%
  group_by(ID, item) %>%
  mutate(event = case_when(PennElementName == "side-by-side" ~ "canvas_time",
                           PennElementName == "selection" ~ "selection_time"),
         selection = case_when("singular" %in% Value ~ "singular",
                               "plural" %in% Value ~ "plural",
                               FALSE ~ NA_character_),
         EventTime = if_else(EventTime == "Never", NA_real_, suppressWarnings(as.numeric(EventTime)))) %>%
  ungroup() %>%
  select(-PennElementName, -Value) %>%
  pivot_wider(names_from = event, values_from = EventTime)

And here’s the error message:
Error: Can’t subset columns that don’t exist.
x Column ID doesn’t exist.

Until three days ago, after reading in the results.csv, the results variable had the “ID”, “item”, and “condition” columns. But, now they dont!