Hi Everyone, I am new to R and am figuring my way around it. I am trying to determine the relationship between A &B, for each week of the year.
My dataset looks like: Year Week A B 1982 1 11.3 198.53 1982 2 14.4 309.00 1982 3 23.2 325.49 When i tried to run glm on just the first entry using [1,] i got the error: Error in nmod2$R4.2w[1, ] : incorrect number of dimensions My edited code for glm is: abundmod1<-glm(R4.2w~N_4,data=nmod1[1:2,]) Does this code still just use the information from the first week? Also since I have to run it for more than 10 years worth of data for 15 weeks, is there a faster way? Thank you so much in advance! Mansi -- View this message in context: http://r.789695.n4.nabble.com/GLM-Modelling-help-needed-tp4655438.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.