?cumsum
?ave

 But without data (follow the posting guide) specific solution can not
be specified

On Fri, Jun 18, 2010 at 11:39 AM, Dan Stanger <dstan...@eatonvance.com> wrote:
> 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
> P.S. Sorry about the repost.
> Eaton Vance Management
> 200 State Street
> Boston, MA 02109
> 617 598 8261
>
> ______________________________________________
> 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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

______________________________________________
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.

Reply via email to