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.POS
Jared -
The value "2010-08-17" is a character value, and your dates
are stored as POSIXlt values. So you'd need to use
Date == as.POSIXlt("2010-08-17")
in your subset statement.
- Phil Spector
Statistic
2 matches
Mail list logo