I am trying to remove rows that have NA values in both Column 7 and Column 12.
I have found the complete.cases command for continuous features here:
dataframe[complete.cases(dataframe[ , 5:6]),]
I have tried the following variations and got the associated errors:
dataframe[complete.cases(dataframe[ , 7,12]),]
invalid 'type' (list) of argument
dataframe[complete.cases(dataframe[ , c(7,12)]),]
Error in C(7, 12) : object not interpretable as a factor
dataframe[complete.cases(dataframe[ , 7 & 12]),]
invalid 'type' (list) of argument
I'm pretty sure I'm just messing up some basic syntax but I'm a bit new to this and drawing a blank. Key aspect, is that it needs to have NA in both column; e.g., if it has data in 7, but NA in 12 or vica versa, I want to keep it.