[R-sig-Geo] Creating a spatial boundary using Lines() and SpatialLines()

Roger Bivand Roger.Bivand at nhh.no
Fri Mar 23 18:50:15 CET 2012


On Fri, 23 Mar 2012, Struve,Juliane wrote:

> Dear list,
>
> I would like to create a spatial line to be used as a boundary in 
> KernelUD(). But my code yields an error message.
>
> bound <- cbind(c(-40,-40,-30,-30,-20,0,20,30,50,100),c(-40,-20,-10,0,10,20,30,30,50,50))
> Slo1 <- Line(bound)
> Sli1 <- Lines(list(Slo1, ID="coastline"))

Sli1 <- Lines(list(Slo1), ID="coastline")

> coastline <- SpatialLines(list(Sli1),ID="coastline")

coastline <- SpatialLines(list(Sli1))
class(coastline)

OK?

Roger

> Sli1
> An object of class "Lines"...
>
> Error in Lines(list(Slo1, ID = "coastline")) : slinelist not a list of Line objects
>
> Would someone be able tell me why this does not work ?
>
> Thanks a lot for your time,
>
> Juliane
>
>
>
>
>
> 	[[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