Resolve missing factor levels in R's lm summary by ensuring consistent factor structures and using na.action = na.omit to handle missing data.