data("imdepi")
if (require("gpclib")) {
    ## assume different interaction ranges and simplify polygons
    oopt <- surveillance.options(gpclib=TRUE)
    imdepi2 <- update(imdepi, eps.t = 20, eps.s = Inf, nCircle2Poly = 16)
    surveillance.options(oopt)
    
    (s <- summary(imdepi))
    (s2 <- summary(imdepi2))
    ## The update reduced the number of infectives (along time)
    ## because the length of the infectious periods is reduced. It also 
    ## changed the set of potential sources of transmission for each
    ## event, since the interaction is shorter in time but wider in space
    ## (eps.s=Inf means interaction over the whole observation region).
}Run the code above in your browser using DataLab