[R-sig-Geo] Points STIKhat

Roger Bivand Roger.Bivand at nhh.no
Sat Oct 6 05:39:33 CEST 2012


On Fri, 5 Oct 2012, Jose Funes wrote:

> Dear all,
> While running the STIKhat function i got the following error.
>
> Traceback:
> 1: .Fortran("stikfunction", as.double(ptsx), as.double(ptsy),
> as.double(ptst),     as.integer(npt), as.double(polyx), as.double(polyy),
> as.integer(np),     as.double(dist), as.integer(ndist), as.double(times),
> as.integer(ntimes),     as.double(bsupt), as.double(binft),
> as.double(lambda), as.integer(infd),     as.integer(edg), (hkhat))
> 2: STIKhat(xyt = sdn3d5, s.region = sdn_borders, dist = u, times = v,
> infectious = TRUE)
> Error in STIKhat(xyt = sdn3d5, s.region = sdn_borders, dist = u, times =
> v,  :
>  caught access violation - continue with care
> #########################################################
> sud <-read.csv("sud.txt")
> sudbrdrs <-read.csv("sudborders.txt")
> sdn3d <- as.3dpoints(sud$Longitude,sud$Latitude,sud$EVENT_DATE)
> plot(sdn3d)
> sdn_borders <-cbind(sdnbrdrs$x,sdnbrdrs$y)
> u <- seq(0,10,by=1)
> v <- seq(0,15,by=1)
> sudanstik <-
> STIKhat(xyt=sdn3d,s.region=sudbrdrs,dist=u,times=v,infectious=TRUE)
> ########################################################
> Thanks,
> Jose

Please provide the output of sessionInfo() and your data set on a URL for 
download - or a reprodicible example with a built-in data set. You did not 
mention which package the function called belongs to. I suspect that this 
is in splancs, and that the polygon boundary is not a simple geometry.

Roger

>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list