Re: [R] field names as function parameters

2009-10-11 Thread tdm
Thanks, just the clue I needed, worked a treat. baptiste auguie-5 wrote: > > Hi, > > I think this is a case where you should use the ?"[[" extraction > operator rather than "$", > > d = data.frame(a=1:3) > mytarget = "a" > d[[mytarget]] > > > HTH, > > baptiste > > 2009/10/11 tdm : >> >> H

Re: [R] field names as function parameters

2009-10-11 Thread baptiste auguie
Hi, I think this is a case where you should use the ?"[[" extraction operator rather than "$", d = data.frame(a=1:3) mytarget = "a" d[[mytarget]] HTH, baptiste 2009/10/11 tdm : > > Hi, > > I am passing a data frame and field name to a function. I've figured out how > I can create the formula