rescue.rectangle {spatstat} | R Documentation |
Determines whether the given window is really a rectangle aligned with the coordinate axes, and if so, converts it to a rectangle object.
rescue.rectangle(W)
W |
A window (object of class "owin" ). |
This function decides whether the window W
is actually a rectangle
aligned with the coordinate axes. This will be true if
W
is
"rectangle"
);
"polygonal"
with a single polygonal boundary) that is a rectangle aligned with
the coordinate axes;
"mask"
) in which
all the pixel entries are TRUE
.
If so, the function returns
this rectangle, a window object of type "rectangle"
.
If not, the function returns W
.
Another object of class "owin"
representing the
same window.
Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner rolf@math.unb.ca http://www.math.unb.ca/~rolf
w <- owin(poly=list(x=c(0,1,1,0),y=c(0,0,1,1))) rw <- rescue.rectangle(w) w <- as.mask(unit.square()) rw <- rescue.rectangle(w)