From lg@utier @ending from gm@il@com  Sat Oct  6 19:26:36 2018
From: lg@utier @ending from gm@il@com (Laurent Gautier)
Date: Sat, 6 Oct 2018 13:26:36 -0400
Subject: [Rd] Warning when calling formals() for `[`.
Message-ID: <CA+JCgN254QaHVepo03ZuGLsatwmjfDSnUP3yq43N6TguBdWN5g@mail.gmail.com>

Hi,

A short code example showing the warning might the only thing needed here:

```
> formals(args(`[`))
NULL

*Warning message:In formals(fun) : argument is not a function*
> is.function(`[`)
[1] TRUE
> is.primitive(`[`)
[1] TRUE
```

Now with an other primitive:

```
> formals(args(`sum`))
$...


$na.rm
[1] FALSE

> is.function(`sum`)
[1] TRUE
> is.primitive(`sum`)
[1] TRUE
> class(`[`)
[1] "function"
```

Is this a feature ?


Laurent

	[[alternative HTML version deleted]]



[Rd] Warning when calling formals() for `[`.
Laurent Gautier