Groups | Search | Server Info | Login | Register


Groups > comp.soft-sys.sas > #995

Duplicate Observations Based on Frequencies

From Kevin <kboswe1@lsu.edu>
Newsgroups comp.soft-sys.sas
Subject Duplicate Observations Based on Frequencies
Date 2011-06-23 12:32 -0700
Organization http://groups.google.com
Message-ID <8425ed9b-ae2f-4827-8a89-c398a1e31fed@k13g2000vbv.googlegroups.com> (permalink)

Show all headers | View raw


Greetings All-

Quick question, I think, regarding duplicating a series of
observations based on a frequency variable.  I have a dataset with a
series of identifier variables (Year, Site, Station, etc.) and have a
length_class variable that describes the length of individuals within
a 10cm class (20, 30, 40) and have the frequency of individuals within
each size class however, I need them listed as individual
observations.  In essence I am working backwards from the raw data
which isnt available in digital format.  An example of the data set is
below and I have also provided an example of what it would ideally
look like.

As always, any assistance would be greatly appreciated.

Datatable
Year     Site     Station  Length_class  Frequency
09         A          1            30                    1
09         B          1            40                    3
10         A          3            40                    2
10         A          2            50                    1
11         A          1            30                    1
11         C          3            50                    4



Datatable Needed
Year     Site     Station  Length_class  Frequency
09         A          1            30                    1
09         B          1            40                    1
09         B          1            40                    1
09         B          1            40                    1
10         A          3            40                    1
10         A          3            40                    1
10         A          2            50                    1
11         A          1            30                    1
11         C          3            50                    1
11         C          3            50                    1
11         C          3            50                    1
11         C          3            50                    1


Cheers,
Kevin

Back to comp.soft-sys.sas | Previous | NextNext in thread | Find similar


Thread

Duplicate Observations Based on Frequencies Kevin <kboswe1@lsu.edu> - 2011-06-23 12:32 -0700
  Re: Duplicate Observations Based on Frequencies Ya <huang8012@gmail.com> - 2011-06-23 13:42 -0700

csiph-web