[R] Use of argument '...'

Juan Lewinger lewinger at usc.edu
Tue Apr 17 11:19:03 CEST 2007

Dear R list,

I've read the function writing sections on both "An introduction to R" and "R language Definition" manuals but still don't understand why the following gives an error message:

fun <- function(x, ...) x + y
fun(1, y=2)

I get:

Error in fun(1, y = 2) : object "y" not found

I'd appreciate any help in understanding this.

R version 2.4.1 (2006-12-18) 

Juan Pablo Lewinger
Department of Preventive Medicine
Keck School of Medicine
University of Southern California
1540 Alcazar Street, CHP-220
Los Angeles, CA 90089-9011, USA

More information about the R-help mailing list