I am a beginner in R. I have an assignment right now, which is to do the data cleaning for a data set. This data set has more than 10,000 rows. My job is too analyze the accuracy for each participant and drop the participant who has low accuracy. Also, each participant answered 200 questions in this data set. In addition, there has a column for the accuracy. In that column, "1" means right and "0" means wrong.
It is how the data set looks like. There has more than 100 participants in this data set. I don't know which loop that I can use for it. Here is what I got so far. If I don't use a loop to do it, then I will do it a least 100 time....
participant1 = dataset_name[dataset_name$Participant_ID == 1,]
mean(participant1$Participant_accuracy)