I have a dataset and I would like to delete the rows that have a complete set of NAs in columns 456:555, I want to keep those with some NAs but I need to delete those with a complete set of NAs
I have tried
final[complete.cases(final[ , 456:555]),]
but this doesn't work. It says
Error in help.search(c("[", "final", "complete.cases(final[, c(456:555)])", : argument ‘pattern’ must be a single character string
then I think this probably would work:
data[rowSums(is.na(data)) != ncol(data),]
but I don't know where to include 456:555 there
what should I do?
Thanks!