From simon.urbanek at r-project.org  Sat Apr 21 19:38:51 2012
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Sat, 21 Apr 2012 13:38:51 -0400
Subject: [Rd] Problem with args
In-Reply-To: <CAP01uR=U_Dy8hU3YV6DQJF5oG94rMs1K--m-2607E_5nkCAkSA@mail.gmail.com>
References: <CAP01uR=U_Dy8hU3YV6DQJF5oG94rMs1K--m-2607E_5nkCAkSA@mail.gmail.com>
Message-ID: <991E37E4-561E-4482-AAEB-3BF400FC14F2@r-project.org>


On Apr 21, 2012, at 1:03 PM, Gabor Grothendieck wrote:

> args ought to check that its argument is a function:
> 
>> max <- 3
>> args(max)
> NULL
> 
> e.g.
> 
>> args <- function(name) {
> +     name <- match.fun(name)
> +     base::args(name)
> + }
>> args(max)
> function (..., na.rm = FALSE)
> NULL
> 

You may want to read the docs in the first place:

Value:
[...]

     'NULL' in case of a non-function.

Cheers,
S



[Rd] Problem with args
Simon Urbanek