s-news
[Top] [All Lists]

running sum of counts

To: s-news@lists.biostat.wustl.edu
Subject: running sum of counts
From: Tim Wade <wade_tj@yahoo.com>
Date: Mon, 19 Apr 2004 11:16:36 -0700 (PDT)
Hello:

I have what I'm sure is a very simple question.

I have a vector like this:

1 1 1 1 2 2 2 3 3 4 4 4 4 4 5 5 5 5 5 6 7 3 3 3 2 2.

I would like to generate a sequence consisting of a
running sum of count values, like this:

1 2 3 4 1 2 3 1 2 1 2 3 4 5 1 2 3 4 5 1 1 1 2 3 1 1.

Thanks very much for any assistance!

Tim


=====
wade_tj@yahoo.com


        
                
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

<Prev in Thread] Current Thread [Next in Thread>