Full_Name: Jelle Goeman
Version: 1.9.0
OS: mingw32, windows 2000
Submission from: (NULL) (145.88.209.33)


Hi Everyone,

I get very strange results using the function hasArg with the ... function
argument. In my own function: 

> gt <- globaltest(X,Y)
> sampling(gt)

works fine, but

> sampling(globaltest(X,Y))

results in:

Error in eval(expr, envir, enclos) : "missing" illegal use of missing

I've tracked down the problem. Define the simple function:

xory <- function(x, ...) if (hasArg(y)) y else x

then 

x <- 1:10
xx <- xory(x)
plot(x, xx)

works fine, but

plot(x, xory(x))

gives the same error. The problem is that the plot function also has an argument
y, which somehow interferes with the hasArg function. Is there an alternative to
hasArg that really checks if an argument y was supplied for the xy function
itself?

Jelle

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel

Reply via email to