On Mon, 28 Jun 2004 11:12:28 +0200 (CEST), [EMAIL PROTECTED] wrote: >Full_Name: Jelle Goeman >Version: 1.9.0 >OS: mingw32, windows 2000 >Submission from: (NULL) (145.88.209.33)
>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? This is still present in 1.9.1 and r-patched (on Windows). It appears to be a bug in or misuse of sys.function: within hasArg, sys.function(0) returns hasArg as expected, but sys.function(1) returns plot. xory() seems to get lost. Duncan Murdoch ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
