spodtSpatialLines: Boundaries of the spatial classification issued from SPODT

Description Usage Arguments Value Author(s) References See Also Examples

Description

This function creates a SpatialLines object that contains the boundaries of the spatial classification issued from the spodt function.

Usage

1

Arguments

object

an object of class spodt, usually, a result of a call to spodt.

data

a SpatialPointsDataFrame containing the coordinates and the variables. spodt needs planar coordinates. Geographic coordinates have to be projected. Otherwise, euclidian coordinates can be used.

Value

A SpatialLines object that contains the boundaries of the spatial classification issued from the spodt function.

Author(s)

Jean Gaudart, Nathalie Graffeo, Guillaume Barbet, Bernard Fichet, Roch Giorgi (Aix-Marseille University)

References

See Also

spodt, spodt.tree, test.spodt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
data(dataMALARIA)
#Example : number of malaria episodes per child at each household,
          #from November to December 2009, Bandiagara, Mali.
#Copyright: Pr Ogobara Doumbo, MRTC, Bamako, Mali. email: okd[at]icermali.org
coordinates(dataMALARIA)<-c("x","y")
class(dataMALARIA)
proj4string(dataMALARIA)<-"+proj=longlat +datum=WGS84 +ellps=WGS84"
dataMALARIA<-spTransform(dataMALARIA, CRS("+proj=merc +datum=WGS84 +ellps=WGS84"))

gr<-0.07   #graft parameter
rtw<-0.01 #rtwo.min
parm<-25  #min.parent
childm<-2 #min.child
lmx<-7 

sp<-spodt(dataMALARIA@data[,2]~1, dataMALARIA, weight=TRUE, graft=gr, min.ch=childm,
          min.parent=parm, level.max=lmx, rtwo.min=rtw)

ssp<-spodtSpatialLines(sp,dataMALARIA)
plot(ssp)
points(dataMALARIA,cex=log(dataMALARIA@data$z*10))

SPODT documentation built on May 2, 2019, 9:43 a.m.