and take a look at
?hasArg
hth,
Matthias
Charles C. Berry wrote:
See
?match.call
and note the expand.dots arg.
HTH,
Chuck
On Thu, 11 Dec 2008, Mark Heckmann wrote:
Hi,
How can I check if a certain ... argument has been passed on to my
user-defined function or not?
foo <- functio
See
?match.call
and note the expand.dots arg.
HTH,
Chuck
On Thu, 11 Dec 2008, Mark Heckmann wrote:
Hi,
How can I check if a certain ... argument has been passed on to my
user-defined function or not?
foo <- function(data, ...)
{
### here I want to check whether xlab was passed
Try this:
foo <- function(data, ...)
{
### here I want to check whether xlab was passed with the ... arguments
### or if the ... arguments did not contain an xlab argument
args <- list(...)
return(ifelse("xlab" %in% names(args), "Exists", "Missing"))
}
On Thu, Dec 11, 2008 at 4:22 PM, Mark Heckma
Hi,
How can I check if a certain ... argument has been passed on to my
user-defined function or not?
foo <- function(data, ...)
{
### here I want to check whether xlab was passed with the ... arguments
### or if the ... arguments did not contain an xlab argument
}
I tried missing(xlab) , exist
4 matches
Mail list logo