[EMAIL PROTECTED] writes:

> x <- do.call("table", c(as.list(substitute(list(...)))[-1],
> list(exclude = exclude)))
> 
> I think this call is finding the local variable "x" (which has been
> used before this line) instead of the argument "x" and thus produces
> an incorrect result.
> 
> How should this be fixed?  What we want is to convert "..." into an
> evaluated list that includes the deparsed arguments as names.  Just
> plain list(...) loses the names.

The knee-jerk reflex on seeing substitute() with ... or formal
arguments is that you need eval.parent somewhere since the names or
expressions passed to a function usually make better sense to the
parent than they do to the current function.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - ([EMAIL PROTECTED])             FAX: (+45) 35327907

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

Reply via email to