
Hi Folks,
               I’m having some trouble with creating ltraj objects from irregular GPS data.   I run the same code on two different csv files with identical columns, number formats etc but get two different results.  The only difference between these files are the values of lat/lon and the date-time stamp. I cannot find any extreme values that might be throwing things out. My main problem is that I keep getting ltraj objects with no defined ‘date.end’. Why would this be happening? I hope it’s something simple. Code below.  Thanks for your time,
John

##using "as.ltraj" to create a trajectory from GPS data in adehabitatLT

data<-read.csv("Animal_1.csv", na.strings="NA")


head(data)

#      ID                Date  Latitude Longitude
#1 Animal_1 2010-12-12 12:30:00 -30.55900  136.8788
#2 Animal_1 2010-12-12 14:30:00 -30.55867  136.8788
#3 Animal_1 2010-12-12 16:30:00 -30.55883  136.8788
#4 Animal_1 2010-12-12 18:30:00 -30.55883  136.8788
#5 Animal_1 2010-12-12 20:30:00 -30.55833  136.8790
#6 Animal_1 2010-12-12 22:30:00 -30.55883  136.8788


Da<-strptime(data$Date,format='%Y-%m-%d %H:%M:%S')

Da<-as.POSIXct(Da)

xy<-data[,c("Longitude", "Latitude")]

id<-data$ID

TRAJAnimal_1<-as.ltraj(xy,id,date=Da, burst=id)


summary(TRAJAnimal_1)

# id                   burst              nb.reloc   NAs       date.begin            date.end
#1Animal_1  Animal_1      2169             0    2010-12-12 12:30:00      2011-08-28 08:30:00




##############################################################################

##running the same code for another file with the same columns, same formats and i get a trajectory with no "date.end"



data<-read.csv("Animal_2.csv", na.strings="NA")

head(data)


#     ID                Date  Latitude Longitude
#1 Animal_2 2010-05-15 20:30:00 -33.82517  138.6078
#2 Animal_2 2010-05-15 22:30:00 -33.82400  138.6085
#3 Animal_2 2010-05-16 00:30:00 -33.82400  138.6085
#4 Animal_2 2010-05-16 02:30:00 -33.82400  138.6085
#5 Animal_2 2010-05-16 04:30:00 -33.82400  138.6085
#6 Animal_2 2010-05-16 08:30:00 -33.82233  138.6060


Da<-strptime(data$Date,format='%Y-%m-%d %H:%M:%S')

Da<-as.POSIXct(Da)

xy<-data[,c("Longitude", "Latitude")]

id<-data$ID

TRAJAnimal_2<-as.ltraj(xy,id,date=Da, burst=id)


summary(TRAJAnimal_2)



#     id                    burst        nb.reloc   NAs          date.begin         date.end
#Animal_2   Animal_2          2858          0     2010-05-15 20:30:00     <NA>


Important Notice: The contents of this email transmission, including any attachments, are intended solely for the named addressee and are confidential and may be subject to legal professional privilege; any unauthorised use, reproduction or storage of the contents and any attachments is expressly prohibited. If you have received this transmission in error, please delete it and any attachments from your system immediately and advise the sender by return email or telephone.  Deakin University does not warrant that this email and any attachments are error or virus free.

Important Notice: The contents of this email are intended solely for the named addressee and are confidential; any unauthorised use, reproduction or storage of the contents is expressly prohibited. If you have received this email in error, please delete it and any attachments immediately and advise the sender by return email or telephone.

Deakin University does not warrant that this email and any attachments are error or virus free.

	[[alternative HTML version deleted]]

