Amanda Kuepfer
2012-Jun-21 11:25 UTC
[R] R crashes with >kud<-kernelUD(data, h="LSCV") script
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 Any suggestions would be greatly appreciated. Many thanks for your time, Kind regards, -Amanda- [[alternative HTML version deleted]]
R. Michael Weylandt
2012-Jun-21 14:59 UTC
[R] R crashes with >kud<-kernelUD(data, h="LSCV") script
Hi Amanda, I can't reproduce this without your data set. Would it be possible for you to give us dput(head(data, 20)) if you need further help? Also, if you could supply the output of sessionInfo()? That's often helpful for anything that "crashes" [that term means many things to different people so if you could be more specific that'd be great as well] Finally, you may with to get in touch with the maintainer of the adehabitatHR package directly. You can get contact info by typing maintainer("adehabitatHR") at your prompt. Best, Michael On Thu, Jun 21, 2012 at 6:25 AM, Amanda Kuepfer <amandakuepfer at yahoo.com> 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 > > > Any suggestions would be greatly appreciated. > > Many thanks for your time, > > Kind regards, > -Amanda- > ? ? ? ?[[alternative HTML version deleted]] > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Peter Ehlers
2012-Jun-21 17:02 UTC
[R] R crashes with >kud<-kernelUD(data, h="LSCV") script
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 crashIn 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]]
Apparently Analagous Threads
- Help on error (Error: could not find function "kernelUD")
- about lscv
- lapply and kernelUD (adehabitatHR package): Home Range kernel estimation for a list of individuals
- Adehabitat package question - trying to generate animal home ranges
- My very first loop!! I failed. May I have some start-up aid?