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 29, 2024, 4:37 a.m.