Re: [R] running count in data.frame

2009-07-01 Thread Mark Knecht
Yes Jim. Thanks. That's what I was looking for. My mistake letting [pos] block. Cheers, Mark On Tue, Jun 30, 2009 at 8:04 PM, jim holtman wrote: > Not exactly sure what you want to count.  Does this do what you want (made a > change in RunningCount) > >> RunningCount = function (MyFrame) { > + #

Re: [R] running count in data.frame

2009-06-30 Thread jim holtman
Not exactly sure what you want to count. Does this do what you want (made a change in RunningCount) > AddCols = function (MyFrame) { +MyFrame$p<-0 +MyFrame$l<-0 +MyFrame$pc<-0 +MyFrame$lc<-0 +return(MyFrame) + } > > BinPosNeg = function (MyFrame) { + + ## P

[R] running count in data.frame

2009-06-30 Thread Mark Knecht
Hi, I need to keep a running count of events that have happened in my data.frame. I found a document called usingR that had an example of doing this for random coin flips and I tried to modify it. It seems to sort of work in the beginning, but then it stops and I don't understand why. I'm trying