I have data I have collected from my university dissertation experiment online and I have loaded the data into R. I am having trouble trying to filter out participants who have scored less than 80% in the first stage of the experiment and participants who have scored less than 100% in the second stage. I was wondering what coding to use to filter out this data.
Here is the coding I have used so far:
library(tidyverse) dat <- read_csv("Learningtask.csv") tidydat <- dat %>% select(participant, response_age_a,response_age_b, response_gender, stage, trial_type, cue, correct_response, response, correct, rt, block_s1, count_s1, count_s2) dat %>% head () dat%>% glimpse() dat_clean <- dat %>% select(participant, trial_type, stage, cue, correct_response, response, correct, rt, block_s1, count_s1, count_s2)
Here I have filtered out the columns I do not need but unsure of what coding to put in the below sentence:
exclude<- c() dat_clean <- dat_clean %>%filter(!subject %in% exclude))
If anyone could help with this it would be much-appreicated :).