search for: rsqrd

Displaying 1 result from an estimated 1 matches for "rsqrd".

Did you mean: rsqrt
2012 Mar 30
1
avoiding expression evaluation when calling a function
Another question on functions - I have something that looks like plotter<-function(i){ temp.i<-rwb[rwb$vector1 <=(i*.10),] with(temp.i, plot(vector2, vector3, main=(i*.10),)) mod<-lm(vector3~vector3-1,data=temp.i) r2<-summary(mod)$adj.r.squared rsqrd[i]<-r2 legend("bottomright", legend=signif(r2), col="black") abline(mod) rsqrd<<-rsqrd } I'd rather not have to go into the function and re-type each vector and dataframe as I apply it to different vectors. My idea is something like: plotter<-function(i,frm,o...