Re: [R] Summing using a boolean index vector (repost in plain text).

2010-06-18 Thread Dan Stanger
ing using a boolean index vector (repost in plain text). ?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 wrote: > Hello all: > I have a dataframe f of weekdays and value, and a Boolean vector wit

Re: [R] Summing using a boolean index vector (repost in plain text).

2010-06-18 Thread jim holtman
?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 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

[R] Summing using a boolean index vector (repost in plain text).

2010-06-18 Thread Dan Stanger
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,