Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is.subset.owin

Determine Whether One Window is Contained In Another


Description

Tests whether window A is a subset of window B.

Usage

is.subset.owin(A, B)

Arguments

A

A window object (see Details).

B

A window object (see Details).

Details

This function tests whether the window A is a subset of the window B.

The arguments A and B must be window objects (either objects of class "owin", or data that can be coerced to this class by as.owin).

Various algorithms are used, depending on the geometrical type of the two windows.

Note that if B is not rectangular, the algorithm proceeds by discretising A, converting it to a pixel mask using as.mask. In this case the resulting answer is only “approximately correct”. The accuracy of the approximation can be controlled: see as.mask.

Value

Logical scalar; TRUE if A is a sub-window of B, otherwise FALSE.

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

Examples

w1 <- as.owin(c(0,1,0,1))
   w2 <- as.owin(c(-1,2,-1,2))
   is.subset.owin(w1,w2)  # Returns TRUE.
   is.subset.owin(w2,w1)  # Returns FALSE.

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.