My purpose is indeed to write a '[' method.
I will go for the `[.data.frame` solution then.
Thank you.
On 25/01/2011 12:53, Prof Brian Ripley wrote:
On Tue, 25 Jan 2011, Renaud Gaujoux wrote:
Hi,
is there an easy, robust, and/or recommended way to distinguish a
missing argument from an empt
On Tue, 25 Jan 2011, Renaud Gaujoux wrote:
Hi,
is there an easy, robust, and/or recommended way to distinguish a missing
argument from an empty argument as in:
An empty argument is a missing argument when argument matching is
done, e.g.
foo <- function(i,j) match.call()
foo(i)
foo(i = i
Hi,
is there an easy, robust, and/or recommended way to distinguish a
missing argument from an empty argument as in:
foo <- function(i, j){
print(missing(j))
print(nargs())
}
foo(i) # TRUE, 1
foo(i,) # TRUE, 2
I know I can work around with nargs, the list of arguments and the names