R/addAttr.R

Defines functions addAttr

addAttr <- function(x, ...) {
  newAttr <- list(...)
  for (n in names(newAttr)) {
    attr(x, n) <- extract2(newAttr, n)
  }
  x
}

Try the templates package in your browser

Any scripts or data that you put into this service are public.

templates documentation built on May 2, 2019, 8:33 a.m.