[R] Problems with "predict" function ii

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Wed Jan 31 18:28:47 CET 2018

This is the kind of thing that leads experienced R users to avoid attach for data analysis. Read "The R Inferno".

Use the "data" argument to lm, and the "newdata" argument to predict.lm.
Sent from my phone. Please excuse my brevity.

On January 31, 2018 9:20:10 AM PST, WRAY NICHOLAS via R-help <r-help at r-project.org> wrote:
>I  have realised that I should have used "detach" before attaching
>dataframe, but even when I do this it's still giving me lots of lines,
>than just one:
>My code:
>for(i in 1:length(mres)){devs[i]<-rnorm(1,0,ssd)}
>	[[alternative HTML version deleted]]
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list