Skip to content
Back to formatted view

Raw Message

Message-ID: <979CC698961E495F8D10A8E89B72229D@TCPC000>
Date: 2008-12-22T23:16:23Z
From: Mark Heckmann
Subject: Problem in passing on an argument via ... how do I access it?

Hi r-experts,


I want to check if a certain argument has been passed on in a function call
via ...

ftest <- function(x1, ...) {
  if(hasArg(y2)==TRUE) print(y2)
}

Now I call the function passing y2 via ... but I cannot access or use the
object.

ftest(y2= 2, x= 1) 

> error in print(y2) : object "y2" not found

What I am doing wrong here? How can I access the object y2?


TIA and Merry Christmas, 
Mark