Forum Replies Created
-
AuthorPosts
-
Aref
ParticipantApparently the function that I was using to read in the csv files was different form the one on the advanced tutorial. Thank you very much, Jeremy.
Aref
ParticipantYes, 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 ColumnID
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!
Aref
ParticipantHi Jeremy,
Today I encountered a problem that had never happened before. When I download the results of the “advanced tutorial” and the “template masked priming” experiments, there are missing columns. In the “advanced tutorial” results, information about “ID”, “item” and “condition” are missing. And in the masked priming, information about “Group”, “Condition”, “Expected” and “PrimeType” are missing. So I can’t use the tidy code in the advanced tutorial section to examine the results. This hadn’t happened before.
ThanksAref
ParticipantThank you so much, Jeremy. It worked.
Aref
ParticipantHi, Jeremy.
I want to design a masked priming experiment and I’ve been trying to use the template masked priming experiment in the projects part to understand how it works (I’m new to coding!). One problem that I’m having is that I can’t use the code that you mention in the advanced tutorial section to tidy the results so that I can calculate the RTs. I’m trying this code:tidied_results <- results %>% filter(PennElementName == "target" | PennElementName == "answerTarget") %>% select(Group, Condition, Expected, PrimeType, PennElementName, Value, EventTime) %>% group_by(Group, Condition) %>% mutate(event = case_when(PennElementName == "target" ~ "target_onset_time", PennElementName == "answerTarget" ~ "selection_time"), selection = case_when("F" %in% Value ~ "word", "J" %in% Value ~ "non-word", 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) tidied_results %>% view()
The problem is that I get more than one value in the ‘target_onset_time’ and ‘selection_time’ columns.
What am I doing wrong?
Thanks -
AuthorPosts