I am following a document teaching how to use regression and right at the onset I get an R error. I understand that variables "conc" and "signal" should have the same length but I am using the what R manual suggests to drop the error and it is not cooperating. What gives? The manual says that the default is na.ombit by the way, not that it's addition does anything
How do I make it omit the extra items? I want to follow this document but it seems that R has changed since that one was written Here is the code conc = c(0 10 20 30 40 50) signal = c (4, 22, 44, 60, 82) lm( signal ~ conc) #Error in model.frame.default(formula = signal ~ conc, drop.unused.levels = TRUE) : #variable lengths differ (found for 'conc') lm (conc~signal, na.action=na.omit) #Error in model.frame.default(formula = conc ~ signal, na.action = na.omit, : #variable lengths differ (found for 'signal') lm (conc~signal, na.action=na.exclude) #Error in model.frame.default(formula = conc ~ signal, na.action = na.exclude, : #variable lengths differ (found for 'signal') -- View this message in context: http://r.789695.n4.nabble.com/lm-function-strange-error-tp4649065.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.