[R] ltraj contains irregular data

Wiebke Ullmann wiebke.ullmann at uni-potsdam.de
Wed Oct 7 18:15:18 CEST 2015


Dear everyone,

as far as I understood the setNA function in adhabitat is there to produce rows in a location dataset that have not been recorded by the GPS collar. I just can not figure out where the problem is. Hope somebody can help me.



>daten$timestamp <- strptime(daten$study.local.timestamp,
format="%Y-%m-%d %H:%M")

>format(round(daten$timestamp, units="hours"),
format="%Y-%m-%d %H:%M:%S")

>daten$timestamp <-
as.POSIXct(daten$timestamp,format="%Y-%m-%d %H:%M:%S")

 

>u<-as.ltraj(daten[,c("utm.easting","utm.northing")],

             
daten$timestamp,id=daten$tag.local.identifier,

             
infolocs=daten[,c("tag.local.identifier",

              "individual.local.identifier")])

>head([[1]])

 

       x      
y                date            dx            dy         dist

407063.1
5911535 2014-05-12 16:00:00      53.75844
-8.434472e+01     100.0200

407116.9
5911451 2014-05-12 17:00:00 -417115.85704 -5.921450e+06 5936122.8652

 -9999.0   -9999
2014-05-12 18:00:00       0.00000  0.000000e+00       0.0000

 -9999.0   -9999
2014-05-12 20:00:00  417008.07372  5.921561e+06 5936226.4139

407009.1
5911562 2014-05-12 21:00:00    
156.63876  1.096218e+02     191.1874

407165.7
5911672 2014-05-12 23:00:00           
NA            NA           NA

        dt          R2n  abs.angle 
rel.angle

3600
3.523851e+13 -1.0033541 -2.5038352

3600
3.523755e+13 -1.6411217 -0.6377675

7200
0.000000e+00         NA         NA

3600
0.000000e+00  1.5004904 -3.1415732

7200
3.523878e+13  0.6106172 -0.8898732

NA   3.524021e+13         NA         NA

 

 

>nex <- setNA(u,u[[1]]$date[1], 1*3600)

 

Fehler in
FUN(X[[i]], ...) : 

  ltraj
contains irregular data (time lag > or < tol)



If you need any additional information on what I have done I am happy to provide it (I am
not sure what you need to be able to help).

Thank you soo much in advance.

Cheers,
Wiebke

 		 	   		  
	[[alternative HTML version deleted]]



More information about the R-help mailing list