[R] as.ltraj error: date should be of the same length as xy
Mako13
mbyrne4 at tigers.lsu.edu
Wed Aug 26 22:02:34 CEST 2009
Hello!
Im really not a whiz at this stuff so please bear with me....
I have radio tracking data involving relocations of raccoons over the course
of a night (locations every 20 minutes). I have the date and time of each
location. I am trying to convert the data into an type II ltraj so I can do
a first passage time analysis. My problem is that when I try to create the
ltraj I get the following error message
Error in as.ltraj(xy, da, id) : date should be of the same length as xy
Does anybody know why I get this message/what it means/how to fix it? Here
is the code I that I have used so far
>data1<- read.csv(file.choose())
> xy <- data1[,c("X","Y")]
> da <- as.character(data1$Time)
> da <- as.POSIXct(strptime(as.character(data1$Time),"%m/%d/%y%H:%M:%S"))
> id <- as.character(data1$id)
> data1 <- as.ltraj(xy, da, id)
Error in as.ltraj(xy, da, id) : date should be of the same length as xy
If anybody could help me get through this I would greatly appreciate it.
Thanks!
Mike
--
View this message in context: http://www.nabble.com/as.ltraj-error%3A-date-should-be-of-the-same-length-as-xy-tp25156508p25156508.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list