[R] Choosing specific Date Range from non-sequential Date
Ogbos Okike
g||ted|||e2014 @end|ng |rom gm@||@com
Mon Sep 9 17:55:15 CEST 2019
Dear Contributors,
I have a data frame of the form:
1997-11-23 -2.91709629064653
1997-12-07 -0.960255426066815
1997-12-11 -1.98210752999868
1997-12-20 -1.10800598439855
1998-01-01 -1.00090115428118
1998-01-29 -1.03056081882709
1998-03-27 -0.873243859498216
1998-04-09 -2.06378384750109
1998-04-12 -2.06826431469008
1998-04-19 -2.49834620746286
1998-05-02 -6.4357083781542
1998-05-17 -2.25359807972754
1998-05-21 -2.55799006865995
1999-08-22 -2.25114162617707
1999-08-25 -1.47905397376409
1999-09-05 -0.641589808755325
1999-09-09 -0.648954682695949
1999-09-13 -0.726364489272492
1999-09-16 -1.28445236942011
The events happen randomly and so the date is non-sequential. It run form
1953 to 2019.
I would like to select all the events/dates between 1998 to 2005.
One of the things I tried is:
Year <- subset(MOSCFD50, date > "1998-01-01" & date < "2005-12-31").
But it didn't work.
I would be thankful if you could please redirect me.
Thank you very much.
Best regards
Ogbos
[[alternative HTML version deleted]]
More information about the R-help
mailing list