Re: [R] Add values of rlm coefficients to xyplot

2010-11-09 Thread PtitBleu
Thank you very much David for the advice ! I haven't checked the plyr and data.table packages but here is the script to replace the for loop :: dfrlm1<-as.data.frame(do.call("rbind", lapply(split(df1, df1$Name), function(X){coef(rlm(col2 ~ col3, data=X))}))) names(dfrlm1)<-c("Intercept", "Slope")

Re: [R] Add values of rlm coefficients to xyplot

2010-11-09 Thread David Winsemius
On Nov 9, 2010, at 8:01 AM, PtitBleu wrote: Hello again, Thanks to this forum, I found a lapply command to apply "rlm" to each Device of the Name column of the df1 data frame (df1 data frame is given in the previous post). I'm now looking for a nice way to create a data frame with the n

Re: [R] Add values of rlm coefficients to xyplot

2010-11-09 Thread PtitBleu
Hello again, Thanks to this forum, I found a lapply command to apply "rlm" to each Device of the Name column of the df1 data frame (df1 data frame is given in the previous post). I'm now looking for a nice way to create a data frame with the name of the device, the intercept and the slope. I now