R/center_at_origin.R

Defines functions center_at_origin

Documented in center_at_origin

#' Creates a new ellipsoid object equivalent to the given hyperellipsoid (hellipse), but centered at the origin.
#'
#' @param hellip The original object, to be shifted
#' @return list of two: hellip2 - the re-centered hyperellipsoid and mu - the amount of the translation

center_at_origin <- function(hellip){
  mu <- get(hellip,"center")
  sig <- get(hellip,"shape")
  c <- get(hellip,"size")
  hellip2 <- hyperellipsoid(matrix(0, length(mu), 1), sig, c)
  return(list(hellip2,mu))
}

Try the SyScSelection package in your browser

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

SyScSelection documentation built on Oct. 26, 2020, 5:08 p.m.