I have a large dataset in wide format where I have 9 waves of data from different timepoints (w1, w2, w3...) and an ID column. I want to exclude participants who only have data on 1 timepoint or 0 timepoints. Earlier, I have excluded participants conditionally with the following code:
Result <- Merged[!(Merged$w1exclude >1),]
However, I am unsure how to adapt the code to include the w1-w9 variables on the condition that 9 or 8 of them have NA's.
This is my first post here and I am new to R so apologies if this has been answered in a thread elsewhere I am now aware of.