I was surprised to notice that statements like:
h = function(...){list(...)}(x=4)
do not throw syntax errors. R claims that 'h' is now a function, but I
can't seem to call it.
> h = function(x){list(x)}(4)
> is(h)
[1] "function" "OptionalFunction" "PossibleMethod"
> h()
Error in list(x) : 'x' is missing
> h(4)
Error in h(4) : attempt to apply non-function
>
What's going on?
Jamie Olson
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.