Hi, I have a long-format dataset with 3 assessment points. Something like this:
dataset = data.frame("id"=c(1,1,1,2,2,2,3,3,3,4,4,4,5,5,5),
"assessment"=c(1,2,3,1,2,3,1,2,3,1,2,3,1,2,3),
"scoreA"=c(7,9,5,NA,5,11,2,3,9,1,NA,NA,7,NA,5),
"scoreB"=c(1,2,7,6,1,11,3,3,2,1,12,NA,NA,4,5))
dataset
I would like to remove all observations belonging to the same ID, if ther is any NA at assessment 1. For instance the ID's 2 and 5 have NA cases at assessment 1, so they should be excluded.
I'm trying to sort this out using dplyr and tidyr functions "group_by" "filter" , etc
Thanks!!