R/util_attach_attr.R

Defines functions util_attach_attr

Documented in util_attach_attr

#' Attach attributes to an object and return it
#'
#' @param x the object
#' @param ... named arguments, each becomes an attributes
#'
#' @return `x`, having the desired attributes attached
util_attach_attr <- function(x, ...) {
  atts <- list(...)
  attributes(x)[names(atts)] <- atts
  x
}

Try the dataquieR package in your browser

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

dataquieR documentation built on July 26, 2023, 6:10 p.m.