Re: [R] avoiding expression evaluation when calling a function

2012-03-31 Thread Rui Barradas
Hello, btc1 wrote > > Hey thanks, that worked. So you're right, I'd like to run it for multiple > values of i. As it's written, I'm doing it in a for loop, as > > plotter<-function(i,fram,framvec,obj,form1,form2){ > temp.i<-fram[framvec <=(i*.10),] > plot(form1, data=temp.i, xlim=c(0,1500), yl

Re: [R] avoiding expression evaluation when calling a function

2012-03-30 Thread Benjamin Caldwell
Hey thanks, that worked. So you're right, I'd like to run it for multiple values of i. As it's written, I'm doing it in a for loop, as plotter<-function(i,fram,framvec,obj,form1,form2){ temp.i<-fram[framvec <=(i*.10),] plot(form1, data=temp.i, xlim=c(0,1500), ylim=c(0,35), main=(i*.10)) mod<-lm(

Re: [R] avoiding expression evaluation when calling a function

2012-03-30 Thread Bert Gunter
Start by reading the Help files,please. ?plot.formula ## and note the data argument So dispense with the unnecessary complex constructions altogether: plot( y~x, data = temp.i) -- Bert On Fri, Mar 30, 2012 at 12:42 PM, Joshua Wiley wrote: > Hi Benjamin, > > See inline > > On Fri, Mar 30, 20

Re: [R] avoiding expression evaluation when calling a function

2012-03-30 Thread Joshua Wiley
Hi Benjamin, See inline On Fri, Mar 30, 2012 at 12:31 PM, Benjamin Caldwell wrote: > 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