is.connected | R Documentation |
Determine whether an object is topologically connected.
is.connected(X, ...)
## Default S3 method:
is.connected(X, ...)
X |
A spatial object such as a pixel image (object of class |
... |
Arguments passed to |
The command is.connected(X)
returns TRUE
if the object
X
consists of a single, topologically-connected piece,
and returns FALSE
if X
consists of several pieces
which are not joined together.
The function is.connected
is generic.
The default method is.connected.default
works for many classes of objects, including windows (class "owin"
)
and images (class "im"
).
There is
a method for point patterns, described in is.connected.ppp
.
A logical value.
.
connected
,
is.connected.ppp
.
d <- distmap(cells, dimyx=256)
X <- levelset(d, 0.07)
plot(X)
is.connected(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.