R/unify.owin.R

Defines functions unify.owin

Documented in unify.owin

unify.owin <- function(W){
  if(!is.owin(W)) stop("'W' must be of spatstat class 'owin'")
  xr <- W$xrange
  yr <- W$yrange
  dx <- diff(xr)
  dy <- diff(yr)
  return(affine(W,matrix(c(1/dx,0,0,1/dy),2,2),c(-xr[1]/dx,-yr[1]/dy)))
}

Try the spagmix package in your browser

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

spagmix documentation built on March 28, 2022, 5:07 p.m.