Re: [R] using names with functions..

2007-11-28 Thread Peter Dalgaard
vito muggeo wrote: > Dear all, > I have the following (rather) strange problem.. > For some reasons, I finally work with a variable whose name includes an > R function, "a.log(z)", say. And that is a problem when I call it in a > formula, for instance: > > > myname<-"a.log(z)" > > dd<-data.fram

Re: [R] using names with functions..

2007-11-28 Thread Duncan Murdoch
On 11/28/2007 9:52 AM, vito muggeo wrote: > Dear all, > I have the following (rather) strange problem.. > For some reasons, I finally work with a variable whose name includes an > R function, "a.log(z)", say. And that is a problem when I call it in a > formula, for instance: > > > myname<-"a.lo

Re: [R] using names with functions..

2007-11-28 Thread Gabor Grothendieck
Names not conforming to the usual R syntax can be placed in backquotes: > `log(x)` <- 1:10 > lm(`log(x)` ~ 1) Call: lm(formula = `log(x)` ~ 1) Coefficients: (Intercept) 5.5 On Nov 28, 2007 9:52 AM, vito muggeo <[EMAIL PROTECTED]> wrote: > Dear all, > I have the following (rather) stran