Skip to content
Prev 37055 / 63421 Next

Attributes of 1st argument in ...

Hi Daniel,
On 02.07.2010, at 23:26, Daniel Murphy wrote:
what about using the somewhat obscure ..1 syntax? This version runs quite a bit faster for me:

  g <- function(...) {
    x <- attr(..1, "foo")
    if (x == "bar")
      cbind(...)
    else
      x
  }

but it will be hard to quantify how this pans out for your unless we know how many and what size and type the arguments are.

Cheers,
Olaf