is.prevR | R Documentation |
rings
or the slot boundary
.Test if an object is of class prevR.
This function test if the class of an object is prevR.
It could be used to test the slot rings
or the slot boundary
.
is.prevR(object, slot = NULL)
object |
object to test. |
slot |
"clusters", "rings","boundary" or "proj". |
Slots rings
and boundary
are always present in an object of
class prevR, but rings
could be NULL
and
boundary
a sf::sf object with an attribute named valid
with the value FALSE
(when boundaries of the studied
area have not been specified explicitly).
If rings
is NULL
, is.prevR(object,"rings")
will return FALSE
.
If boundary
has an attribute valid
equal to FALSE
,
is.prevR(object,"boundary")
will return FALSE
.
TRUE
or FALSE
prevR.
col <- c(
id = "cluster",
x = "x",
y = "y",
n = "n",
pos = "pos",
c.type = "residence",
wn = "weighted.n",
wpos = "weighted.pos"
)
dhs <- as.prevR(fdhs.clusters, col, fdhs.boundary)
is.prevR(dhs)
is.prevR(dhs, "rings")
is.prevR(dhs, "boundary")
dhs <- rings(dhs, N = 300)
is.prevR(dhs, "rings")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.