[R] R crashes with >kud<-kernelUD(data, h="LSCV") script
Peter Ehlers
ehlers at ucalgary.ca
Thu Jun 21 19:02:42 CEST 2012
On 2012-06-21 04:25, Amanda Kuepfer wrote:
> Hi,
>
> I am looking to perform a kernel density analysis in R, following the script that a friend of mine is using successfully. However, unlike for her, when I enter>kud<-kernelUD(data, h="LSCV"), R crashes and closes every time. This does not happen when I perform a different kernel analysis (>kud<-kernelUD(data))..
>
> I have tried to un-install and re-install R, but it still crashes..
>
>
> The script I am using is as follows:
>
> library(adehabitatHR)
> library(maptools)
> data<-read.csv("sa 4 trips 13F.csv")
> xy = data[c("X", "Y")]
> id<-data[,c("ID")]
> coordinates(data) = c("X", "Y")
> class(data)
>
> kud<-kernelUD(data) # this works fine
> kud<-kernelUD(data, h="LSCV") # this causes R to crash
In both cases, shouldn't that be 'xy' instead of 'data'?
Presumably, your data.frame 'data' (bad name) contains
at least one more column ('ID'). Or why did you define
'xy' and then not use it?
Peter Ehlers
>
>
> Any suggestions would be greatly appreciated.
>
> Many thanks for your time,
>
> Kind regards,
> -Amanda-
> [[alternative HTML version deleted]]
More information about the R-help
mailing list