Re: [Rd] Getting param names of primitives

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Wed, 11 Jul 2007 09:50:29 -0400

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 <ripley_at_stats.ox.ac.uk> 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
> >
> > 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 names from it.
> >
> > Thanks,
> > M. Manese
>
> --
> Brian D. Ripley, ripley_at_stats.ox.ac.uk
> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel: +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UK Fax: +44 1865 272595
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 11 Jul 2007 - 13:54:06 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 11 Jul 2007 - 15:06:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.