[R] Date Comparing *Problem*

arun smartpink111 at yahoo.com
Mon Sep 23 16:04:44 CEST 2013


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.8441754
A.K.



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



More information about the R-help mailing list