Say I have data.frame a
a
I use
m.fit <- lm(col2 ~ col3 * col4, na.action = na.exclude)
col2 has some <
col2
I just encountered the same problem. get the finite elements using
finiteElements = which(is.finite(col3*col4)) finiteData = data[finiteElements,] lm(col2~col3*col4,na.action=na.exclude,data=finiteData)