Hello all: I have a dataframe f of weekdays and value, and a Boolean vector with Fridays set to true, and other days set to false, created by fridays<-(diff(f$weekdays) < -1). I would like to create a vector of sums, for each week. That is, start summing on the first false value in the vector, and when I get to true, produce the sum, and start summing again. Is there a vector operation which can do this, without writing an explicit loop? Thank you, Dan Stanger Eaton Vance Management 200 State Street Boston, MA 02109 617 598 8261
[[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.