Re: [Rd] Getting param names of primitives

2007-07-11 Thread Gabor Grothendieck
These don't work either: args(match.fun("{")) args("{") On 7/11/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > On Wed, 11 Jul 2007, Duncan Murdoch wrote: > > > On 7/11/2007 9:40 AM, Seth Falcon wrote: > >> Prof Brian Ripley <[EMAIL PROTECTED]> writes: > >> > >>> My problem is that if we mak

Re: [Rd] Getting param names of primitives

2007-07-11 Thread Prof Brian Ripley
On Wed, 11 Jul 2007, Duncan Murdoch wrote: > On 7/11/2007 9:40 AM, Seth Falcon wrote: >> Prof Brian Ripley <[EMAIL PROTECTED]> writes: >> >>> My problem is that if we make formals() work on primitives, people will >>> expect >>> >>> formals(log) <- value >>> >>> to work, and it cannot. >> >>

Re: [Rd] Getting param names of primitives

2007-07-11 Thread Duncan Murdoch
On 7/11/2007 9:40 AM, Seth Falcon wrote: > Prof Brian Ripley <[EMAIL PROTECTED]> writes: > >> My problem is that if we make formals() work on primitives, people will >> expect >> >> formals(log) <- value >> >> to work, and it cannot. > > But it could give an informative error message. Asking fo

Re: [Rd] Getting param names of primitives

2007-07-11 Thread Gabor Grothendieck
Even that does not appear to work everywhere. Either of these returns NULL: formals(args("{")) formals(args(match.fun("{"))) > R.version.string # XP [1] "R version 2.5.1 (2007-06-27)" On 7/11/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > > formals(args(log)) > $x > > > $base > exp(1) > > g

Re: [Rd] Getting param names of primitives

2007-07-11 Thread Seth Falcon
Prof Brian Ripley <[EMAIL PROTECTED]> writes: > My problem is that if we make formals() work on primitives, people will > expect > > formals(log) <- value > > to work, and it cannot. But it could give an informative error message. Asking for formals() seems to make sense so making it work seems

Re: [Rd] Getting param names of primitives

2007-07-11 Thread Prof Brian Ripley
My problem is that if we make formals() work on primitives, people will expect formals(log) <- value to work, and it cannot. On Wed, 11 Jul 2007, Martin Maechler wrote: >> "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]> >> on Wed, 11 Jul 2007 05:48:56 +0100 (BST) writes: > >>> f

Re: [Rd] Getting param names of primitives

2007-07-11 Thread Martin Maechler
> "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]> > on Wed, 11 Jul 2007 05:48:56 +0100 (BST) writes: >> formals(args(log)) BDR> $x BDR> $base BDR> exp(1) BDR> gives what formals(log) used to. (I knew). I've been asking myself several times now, if we should not m

Re: [Rd] Getting param names of primitives

2007-07-10 Thread miguel manese
Thanks! Worked like a charm. Regards, M. Manese On 7/11/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > > formals(args(log)) > $x > > > $base > exp(1) > > gives what formals(log) used to. > > On Wed, 11 Jul 2007, miguel manese wrote: > > > Hi, > > > > In the latest R this does not work anymore

Re: [Rd] Getting param names of primitives

2007-07-10 Thread Prof Brian Ripley
> formals(args(log)) $x $base exp(1) gives what formals(log) used to. On Wed, 11 Jul 2007, miguel manese wrote: > Hi, > > In the latest R this does not work anymore > > args <- formals(log) > > because log is primitive. Is there any other way to get the argument > list? I just need the name of

[Rd] Getting param names of primitives

2007-07-10 Thread miguel manese
Hi, In the latest R this does not work anymore args <- formals(log) because log is primitive. Is there any other way to get the argument list? I just need the name of the parameter to display some error message about it. I have looked at args() but I can't find anything to extract the argument n