Hi everyone,

I am trying to create an object of class ltraj, but not successfully so far.
Here is a sample of my data (GPS relocations):

idnr name    Date Time Date Time X Y
L-00094 Bodil 17/02/04 11:05:52 17/02/2004 11:05:52 1566688 7445760
L-00094 Bodil 17/02/04 14:04:54 17/02/2004 14:04:54 1566392 7444546
L-00094 Bodil 17/02/04 17:01:04 17/02/2004 17:01:04 1566401 7444543
L-00094 Bodil 17/02/04 23:00:42 17/02/2004 23:00:42 1566509 7443853
L-00094 Bodil 18/02/04 02:00:42 18/02/2004 02:00:42 1566813 7443226

and here is my R coding:

#Timestamp: date_time into a POSIXct class:
timestamp <- as.POSIXct(strptime(as.character(data$Date.Time), "%d/%m/%Y
%H:%M:%S"), "GMT")
data_timestamp <- data.frame(data, timestamp=timestamp)

I also tried this way:

date <- as.POSIXct(strptime(paste(data$Date, data$Time), "%d/%m/%Y
%H:%M:%S"), "GMT")
data_timestamp <- data.frame(data, timestamp=date)
(which is not working, dates are displayed Y/M/D and I don't understand
why!)

and finally:

#Create a ltraj object:
data_ltraj <- as.ltraj(data, date=timestamp, id=data$name, typeII = TRUE)

and you have to know that I have done that before as well:

#Spatial points data frame:
coordinates(data) <- c("X", "Y")
proj4string(data) <- CRS("+init=epsg:3021")

>From that I either have this warning message:

Erreur dans data.frame(..., check.names = FALSE) :
  arguments imply differing number of rows: 1, 12328, 0


or the following



Messages d'avis :1: In Ops.factor(x1$x, x2$x) : - not meaningful for
factors2: In Ops.factor(x1$y, x2$y) : - not meaningful for factors3:
In Ops.factor(x$x, x$x[1]) : - not meaningful for factors4: In
Ops.factor(x$y, x$y[1]) : - not meaningful for factors5: In
Ops.factor(x1$x, x2$x) : - not meaningful for factors6: In
Ops.factor(x1$y, x2$y) : - not meaningful for factors7: In
Ops.factor(df[-nrow(df), "x"], df[-1, "x"]) :
  - not meaningful for factors8: In Ops.factor(df[-nrow(df), "y"],
df[-1, "y"]) :
  - not meaningful for factors


but only when I enter: data_ltraj <- as.ltraj(data_timestamp,
date=timestamp, id=data$name, typeII = TRUE)

Am I missing something?
Thanx for helping, I appreciate.

--
Dylann Kersusan
Master Biodiversity and Conservation
Zoology dept. Stockholm University

	[[alternative HTML version deleted]]

