[R] How do I query "..." in a function call?

Jonathan Greenberg
Mon, 21 Nov 2011 22:18:27 -0000

This is probably a very noobish question, but if I want to create a
function that allows an undetermined number of, say, numeric vectors to be
fed to it, I would use:

myfunction = function(...)
{
# Do something

}

Right?  If so, how do I a) count the number of vectors "fed" to the
function, and b) how do I treat those vectors as variables, e.g. for the
call:

myfunction(c(1:10),c(2:11),c(3:13))

Thanks!

--j

--
Jonathan A. Greenberg, PhD
Assistant Professor
Department of Geography
University of Illinois at Urbana-Champaign
607 South Mathews Avenue, MC 150
Urbana, IL 61801
Phone: 415-763-5476
AIM: jgrn307, MSN: jgrn307@hotmail.com, Gchat: jgrn307, Skype: jgrn3007