inst/staticexports/class.R

# Set the class of x. Faster than `structure(x, class = class)`, which is
# surprisingly slow.
set_class <- function(x, class) {
  class(x) <- class
  x
}
wch/staticimports documentation built on Jan. 13, 2024, 8:48 p.m.