R/utils.R

Defines functions unscale

unscale <- function(x, center = attr(x, "scaled:center"), scale = attr(x, "scaled:scale")) {
  out <- scale(x, center = (-center / scale), scale = 1 / scale)
  attr(out, "scaled:center") <- attr(out, "scaled:scale") <- NULL
  out
}

Try the pema package in your browser

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

pema documentation built on March 31, 2023, 11:38 p.m.