Re: [R] help with loop over data frame

2007-02-19 Thread Gabor Grothendieck
Try this: DF[c(FALSE, tail(DF$Open, -1) head(DF$High, -1)), ] or using zoo objects just compare the Open to the reverse lag of the High. Lines - Date Open HighLowClose 1/15/2000 10 11 8 10 1/16/2000 12 12 10 11 1/17/2000 12 12 10

[R] help with loop over data frame

2007-02-18 Thread Dr Remo Sammassimo
Dear List, This may be the fifth time Ive tried to send this to the list so apologies if there are multiple emails. I need some help getting started with this problem. I have a data frame containing a year of daily stock prices in the following format: Date Open HighLowClose

Re: [R] help with loop over data frame

2007-02-18 Thread Marc Schwartz
On Mon, 2007-02-19 at 13:38 +1100, Dr Remo Sammassimo wrote: Dear List, This may be the fifth time Ive tried to send this to the list so apologies if there are multiple emails. I need some help getting started with this problem. I have a data frame containing a year of daily stock prices