Say I have data.frame a
I use
m.fit <- lm(col2 ~ col3 * col4, na.action = na.exclude)
col2 has some <
I know this thread is really old, but the answers don't seem complete, and I just ran into the same problem.
The problem I was having was because the NA columns also had NaN and Inf. Remove those and try it again. Specifically:
col2[which(is.nan(col2))] = NA
col2[which(col2==Inf)] = NA
Hope that helps your 18 month old question!