From toth@dene@ @ending from kogentum@hu  Thu May  3 16:29:28 2018
From: toth@dene@ @ending from kogentum@hu (=?UTF-8?B?RMOpbmVzIFTDs3Ro?=)
Date: Thu, 3 May 2018 16:29:28 +0200
Subject: [Rd] length of `...`
Message-ID: <d0b68216-4922-2249-e5e6-1589345dc6d7@kogentum.hu>

Hi,


In some cases the number of arguments passed as ... must be determined 
inside a function, without evaluating the arguments themselves. I use 
the following construct:

dotlength <- function(...) length(substitute(expression(...))) - 1L

# Usage (returns 3):
dotlength(1, 4, something = undefined)

How can I define a method for length() which could be called directly on 
`...`? Or is it an intention to extend the base length() function to 
accept ellipses?


Regards,
Denes




[Rd] length of `...`
=?UTF-8?B?RMOpbmVzIFTDs3Ro?=