is.prevR: Test if an object is of class prevR. This function test if...

Description Usage Arguments Details Value See Also Examples

View source: R/is.prevR.r

Description

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.

Usage

1
is.prevR(object, slot = NULL)

Arguments

object

object to test.

slot

"clusters", "rings","boundary" or "proj".

Details

Slots rings and boundary are always present in an object of class prevR, but rings could be NULL and boundary a sp::SpatialPolygons with an attribute named valid with the value FALSE (when boundaries of the studied area have not been specified explicitly).

Value

TRUE or FALSE.

See Also

prevR.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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")

prevR documentation built on Aug. 28, 2020, 5:08 p.m.