rownames of idData of move object does not always return individual name
Hi Bart, so Chole realized that when you do a move object from own data the rownames of idData does not return the individual id. If data comes from MB it works. I do not see why this happens...
library(move)
## from own data
trackA <- data.frame(x = 1, y = 1:5, t = as.POSIXct("2009-5-1 1:00:00", tz = "") + 1:5, id = "A1")
trackB <- data.frame(x = -1:3, y = 3, t = as.POSIXct("2009-5-1 1:00:00", tz = "") + 1:5, id = "B2")
trackAB <- rbind(trackA, trackB)
moveA <- move(x = trackA$x, y = trackA$y, time = trackA$t, proj = CRS("+proj=aeqd"), animal = trackA$id)
rownames(idData(moveA)) ## returns NULL
moveA2 <- move(x = trackA$x, y = trackA$y, time = trackA$t, proj = CRS("+proj=aeqd"), animal = "A1")
rownames(idData(moveA2)) ## returns NULL
moveStackAB <- move(x = trackAB$x, y = trackAB$y, time = trackAB$t, proj = CRS("+proj=aeqd"), animal = trackAB$id)
rownames(idData(moveStackAB)) ## returns the individual ids
## from MB data
filePath<-system.file("extdata","leroy.csv.gz",package="move")
leroy <- move(filePath)
row.names(idData(leroy)) ## returns the individual id
file <- read.table(filePath, header=TRUE, sep=",", dec=".")
leroy2 <- move(x=file$location.long, y=file$location.lat,
time=as.POSIXct(file$timestamp, format="%Y-%m-%d %H:%M:%S", tz="UTC"),
proj=CRS("+proj=longlat +ellps=WGS84"), animal="Leroy", sensor="GPS")
row.names(idData(leroy2)) ## returns the individual id