I a am quiet new to R. I want to select rows that have at least four consecutive values. I started to do this but I'm kind of stocked now and don't know what to do. Does any one know how to do ? Thank you !
library(openxlsx)
DATA <- openxlsx::read.xlsx("DATAA.xlsx")
DATA$nb_na <- rowSums(is.na(DATA[,7:26]))
DATA4 <- subset(DATA, nb_na<=16)