[R-sig-finance] How to extract data?
ebashi
arshia22 at yahoo.com
Tue Nov 23 21:54:40 CET 2004
I appreciate if anyone can help me,
I have a table as follow,
> rate
DATE VALUE
1 1997-01-10 5.30
2 1997-01-17 5.30
3 1997-01-24 5.28
4 1997-01-31 5.30
5 1997-02-07 5.29
6 1997-02-14 5.26
7 1997-02-21 5.24
8 1997-02-28 5.26
9 1997-03-07 5.30
10 1997-03-14 5.30
. ...... ...
. ...... ...
. ...... ...
I want to extract the DATE(s) on which the VALUE has
already dropped twice and the DATE(s) that VALUE has
already increased for three times,( ignore where
VALUE(i+1)-VALUE(i)=0),I try to use diff() function,
however that works only for one increase or decrease.
Sincerely,
Sean
More information about the R-sig-finance
mailing list