This should work:
> test <-subset(wild,ID=="2830" & Date==as.POSIXlt("2010-08-17"))

If not, here's another solution:
> dates <- c("2010-05-28","2010-08-17")
> dates <- as.POSIXlt(dates)
> id <- c("2830","2830")
> data <- data.frame(id,dates)
> test <- data[data$id == "2830" & data$dates == as.POSIXlt("2010-08-17"), ]
> test
    id      dates
2 2830 2010-08-17
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Subset-POSIXlt-Field-tp2956822p2956890.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to