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

Roger Bivand Roger.Bivand at nhh.no
Mon Mar 26 19:28:11 CEST 2012


No idea. Can users of kernelUD() reply? Please also read the manual page, 
"href" is said to be an ad hoc method to find a suitable value, but maybe 
it doesn't suit your data?

Roger


On Mon, 26 Mar 2012, Struve,Juliane wrote:

> Dear Roger,
>
> Thank you for this helpful comment. The spatial boundary now works. 
> However, when I submit it to KernelUD() using
> kernelUD(Movement_Spatial,h="href",grid=Raster_map,boundary=coastline)
> I get an error message
> "Error in 3 * h : non-numeric argument to binary operator"
> The boundary is simple and far away from the locations used for the 
> Kernel estimation. The smoothing parameter href is 5.5 and the boundary 
> seems to satisfy the conditions required to use it in KernelUD(). What 
> does this message refer to ?
>
> Thank you again for your time,
>
> Juliane
>
>
>
> Dr. Juliane Struve
> Fisheries and Aquatic Sciences
> 7922 NW 71st Street, Gainesville, FL 32653
> 352-273-3632 (tel)
> 352-392-3672 (fax)
> email: jstruve at ufl.edu
>
>
>
> -----Original Message-----
> From: Roger Bivand [mailto:Roger.Bivand at nhh.no]
> Sent: Friday, March 23, 2012 1:50 PM
> To: Struve,Juliane
> Cc: r-sig-geo at r-project.org
> Subject: Re: [R-sig-Geo] Creating a spatial boundary using Lines() and SpatialLines()
>
> 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