search for: tp4517310p4517387

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

2012 Mar 29
3
scalar assignment within a vector within function
Hello, I'm trying to create a vector of r^2 values for using a function which I will run in a "for" loop. Example: per<-rnorm(100,.5,.2)^2 x<-rnorm(100,10,5) y<-rnorm(100,20,5) fr<-data.frame(x,y,per) test<-rep(0,9) plotter<-function(i){ temp.i<-fr[fr$per <=(i*.10),] with(temp.i, plot(x, y, main=(i*.10),)) mod<-lm(y~x-1,data=temp.i)