Re: [R] Date Comparing *Problem*

2013-09-24 Thread Uwe Ligges
On 23.09.2013 13:48, Rhymes wrote: I have a problem with comparing dates. i tried it like "datesub = subset(data, 2012-11-19 < data$date)", but this doesn't work and i don't know why. Errr, in R: 2012-11-19 == 1982 You probably want to convert it to a Date object or Posix.. object, but sin

[R] Date Comparing *Problem*

2013-09-23 Thread Rhymes
I have a problem with comparing dates. i tried it like "datesub = subset(data, 2012-11-19 < data$date)", but this doesn't work and i don't know why. Hope you can help me. here are my files: http://uploaded.net/file/n9sxdm0v -- View this message in context:

Re: [R] Date Comparing *Problem*

2013-09-23 Thread arun
Hi, Try: set.seed(634) dat<- data.frame(date=seq(as.Date("2012-11-15"),length.out=10,by="1 day"), value=rnorm(10)) subset(dat,"2012-11-19" < date)  # date  value #6  2012-11-20 -0.3290021 #7  2012-11-21  0.3106802 #8  2012-11-22 -1.0782814 #9  2012-11-23 -0.1333426 #10 2012-11-24  0.