Background Before running a stepwise model selection, I need to remove missing values for any of my model terms. With quite a few terms in my model, there are t
Let dat be a data frame and cols a vector of column names or column numbers of interest. Then you can use
dat
cols
dat[!rowSums(is.na(dat[cols])), ]
to exclude all rows with at least one NA.
NA