[R] Duplicated date values aren't duplicates
odocoileus55
aaron.foley at students.tamuk.edu
Wed Dec 29 19:38:33 CET 2010
Hi all,
I am experiencing a similar issue with "non unique dates for a given burst".
This is more of a practice session for me, I have data from 1 collared
animal and for practice, assigned this individual 2 bursts (wk1 and wk2).
This is what I have:
ID DATETIME BURST X Y
1 12021 11/28/2006 0:01 wk1 6xxxxxx 30xxxxx
2 12021 11/28/2006 1:01 wk1 6xxxxxx 30xxxxx
3 12021 11/28/2006 2:01 wk1 6xxxxxx 30xxxxx
Codes are:
data=read.csv("test.csv",header=TRUE)
attach(data)
xy<-data[,c("X","Y")]
da<-as.character(data$DATETIME)
da<-as.POSIXct(strptime(as.character(data$DATETIME),"%m/%d/%Y %H:%M"))
litr<-as.ltraj(xy,da,id,burst,typeII=TRUE)
##error is displayed
##checking for duplicates
dupz=which(duplicated(da))
## results show "55 210", can not be right since duplicated times are
impossible
##checking for duplicates in xy
dupz=which(duplicated(xy))
##results show "0"
##one thing I noticed is that xy is in 1 column and da is displayed in 7
columns. Could that be the issue? Perhaps the da needs to be in one column
to match up with the xy?
Thanks in advance.
--
View this message in context: http://r.789695.n4.nabble.com/Duplicated-date-values-aren-t-duplicates-tp897178p3167487.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list