~ubuntu-branches/ubuntu/maverick/ploticus/maverick

« back to all changes in this revision

Viewing changes to doc/tabulate.html

  • Committer: Bazaar Package Importer
  • Author(s): James W. Penny
  • Date: 2002-04-10 23:02:04 UTC
  • Revision ID: james.westby@ubuntu.com-20020410230204-64em4ns2f57c5u3l
Tags: 2.0.3-1
* The "That Tears it, Now You Have to Update Docs Package" Release.
* New upstream release (well, not so new :-( )   closes: Bug#137578
* Correct missing libpng2-dev in build-depends.  closes: Bug#142205
* Use correct syntax to:
* close URL type.                                closes: Bug#137577
* fix Architecture                               closes: Bug#141657
* close ITP                                      closes: Bug#132878

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
<head>
 
3
<!-- This file has been generated by unroff 1.0, 03/01/02 09:13:44. -->
 
4
<!-- Do not edit! -->
 
5
<STYLE TYPE="text/css">
 
6
<!--
 
7
        A:link{text-decoration:none}
 
8
        A:visited{text-decoration:none}
 
9
        A:active{text-decoration:none}
 
10
-->
 
11
</STYLE>
 
12
<title>ploticus: proc tabulate</title>
 
13
<body bgcolor=D0D0EE vlink=0000FF>
 
14
<br>
 
15
<br>
 
16
<center>
 
17
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
 
18
<td>
 
19
  <table cellpadding=2 width=550><tr>
 
20
  <td><br><h2>proc tabulate</h2></td>
 
21
  <td align=right>
 
22
  <small>
 
23
  <a href="../doc/Welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
 
24
  <a href="../doc/Welcome.html">Welcome</a> &nbsp; &nbsp;
 
25
  <a href="../gallery/index.html">Gallery</a> &nbsp; &nbsp;
 
26
  <a href="../doc/Contents.html">Handbook</a> 
 
27
  <td></tr></table>
 
28
</td></tr>
 
29
<td>
 
30
<br>
 
31
<br>
 
32
 
 
33
<title>Manual page for proc_tabulate(PL)</title>
 
34
</head>
 
35
<body>
 
36
 
 
37
 
 
38
<h2>DESCRIPTION</h2>
 
39
<b>proc tabulate</b> may be used to compute a one-way distribution on one 
 
40
data field, or a two-way distribution using two data fields.<tt> </tt>
 
41
The results are then considered the "current"
 
42
data set for plotting.  
 
43
<p>
 
44
<b>proc tabulate</b> has a capacity of 200 result rows and 
 
45
60 result columns.<tt> </tt>
 
46
Data does not have to be ordered in any particular way.<tt> </tt>
 
47
See also the <b>proc processdata</b> <tt>count</tt> action, which requires
 
48
ordered data but has no upper limit on number of "bins".<tt> </tt>
 
49
<p>
 
50
The <tt>savetable</tt> feature is recommended so that you can see
 
51
what the data set will look like when developing a plot.<tt> </tt>
 
52
 
 
53
<h2>FEATURES</h2>
 
54
Can tabulate to produce one- or two-way distributions.  
 
55
Bins may be based on natural occurance or by preset lists or ranges.  
 
56
Percents may be calculated.  Ordering of results may be controlled.<tt> </tt>
 
57
Occurances may be counted, or accumulations may be done.<tt> </tt>
 
58
Resulting text table may be displayed on screen or saved for other uses.<tt> </tt>
 
59
 
 
60
<h2>EXAMPLES</h2>
 
61
See the Gallery examples
 
62
<a href="../gallery/distrib.htm">
 
63
distrib
 
64
</a>
 
65
and 
 
66
<a href="../gallery/vermonth.htm">
 
67
vermonth
 
68
</a>
 
69
 
 
70
<h2>PREREQUISITES</h2>
 
71
<b>proc getdata</b> must first be executed to define or access some data.<tt> </tt>
 
72
 
 
73
<h2>VARIABLES SET</h2>
 
74
<p>
 
75
<b>NROWS</b> = Number of rows in the data result.<tt> </tt>
 
76
<p>
 
77
<b>NFIELDS</b> = Number of fields per row in the data result.<tt> </tt>
 
78
<p>
 
79
Thus, if a one-way distribution is being done and there are 7 varieties,
 
80
NRECORDS will hold 7, which may then be used (e.g. xrange: @NRECORDS+1) 
 
81
to automatically set scaling for a bargraph.<tt> </tt>
 
82
 
 
83
 
 
84
<h2>MODES</h2>
 
85
Either one-dimensional or two-dimensional modes.<tt> </tt>
 
86
<p>
 
87
If <tt>datafield1</tt> is specified but <tt>datafield2</tt> is not,
 
88
a <b>one-dimensional</b> distribution will be computed.<tt> </tt>
 
89
The result will be two data fields-- the first field
 
90
will be the value and the second field will be the number of
 
91
instances.  The number of records in the result will be
 
92
the number of bins.<tt> </tt>
 
93
<p>
 
94
If both <tt>datafield1</tt> and <tt>datafield2</tt> are specified
 
95
then a <b>two-dimensional</b> distribution will be computed.<tt> </tt>
 
96
Datafield1 will be distributed downward and datafield2
 
97
will be distributed across.  
 
98
The result's column headings will be usable as field names
 
99
(the first column is always named <tt>rowname</tt>).<tt> </tt>
 
100
<p>
 
101
Many of the attributes are named with either 1 or 2
 
102
to correspond with either the distribution on
 
103
datafield1, or datafield2.<tt> </tt>
 
104
 
 
105
<h2>NOTE</h2>
 
106
After <b>proc tabulate</b> executes, all subsequent plotting
 
107
procedures in the script file will access its results 
 
108
for plotting.  However,
 
109
the original data is still in memory.  If later it is
 
110
necessary to plot the original data, <b>proc originaldata</b>
 
111
may be invoked.<tt> </tt>
 
112
 
 
113
 
 
114
 
 
115
<h2>MANDATORY ATTRIBUTES</h2>
 
116
The <tt>datafield1</tt> attribute must be specified.<tt> </tt>
 
117
<p>
 
118
If a <tt>valuelist</tt> is not specified, all values encountered will
 
119
get their own bin in the distribution.<tt> </tt>
 
120
 
 
121
 
 
122
<h2>ATTRIBUTES</h2>
 
123
<p>
 
124
<b>datafield1</b> 
 
125
<a href="attributetypes.html#dfield">
 
126
<i> dfield </i>
 
127
</a>
 
128
<dl>
 
129
<dt><dd><p>
 
130
Compute a distribution on this data field.<tt> </tt>
 
131
Value will be in result data field 1 and N will be
 
132
in result data field2.<tt> </tt>
 
133
Example: <tt>datafield1: 1</tt>
 
134
 
 
135
</dl>
 
136
<p>
 
137
<b>datafield2</b> 
 
138
<a href="attributetypes.html#dfield">
 
139
<i> dfield </i>
 
140
</a>
 
141
<dl>
 
142
<dt><dd><p>
 
143
Compute a two way distribution on datafield1 and this field.<tt> </tt>
 
144
Distribution on datafield2 will be horizontal.<tt> </tt>
 
145
See also MODES above.<tt> </tt>
 
146
Example: <tt>datafield2: 5</tt>
 
147
 
 
148
</dl>
 
149
<p>
 
150
<b>axis1</b> <tt>x | y</tt>
 
151
<dl>
 
152
<dt><dd><p>
 
153
Axis to equivicate with the distribution on datafield1.<tt> </tt>
 
154
This needs to be specified when working with 
 
155
data which is to be scaled using units such as date or time.<tt> </tt>
 
156
Otherwise it does not need to be specified.<tt> </tt>
 
157
 
 
158
</dl>
 
159
<p>
 
160
<b>axis2</b> <tt>x</tt>|<tt>y</tt>
 
161
<dl>
 
162
<dt><dd><p>
 
163
Same as <tt>axis1</tt>.<tt> </tt>
 
164
 
 
165
</dl>
 
166
<p>
 
167
<b>valuelist1</b> <i>stringlist</i>
 
168
<dl>
 
169
<dt><dd><p>
 
170
Define a set of values that will be included in the distribution
 
171
of datafield1.<tt> </tt>
 
172
The ordering of this set determines the order that categories 
 
173
are presented in the result.  
 
174
This is a space- or comma-delimited list of values.  
 
175
<br>
 
176
Example: <tt>valuelist: red green blue</tt>
 
177
<dt><dd><p>
 
178
If ranges are being used (<tt>dorange1: yes</tt>), then this attribute
 
179
may be used to explicitly define the ranges.  See the following example for
 
180
the syntax; by default, dash (-) is used to separate the low and hi
 
181
values in a range, with no embedded spaces allowed.<tt> </tt>
 
182
<dt><dd><p>
 
183
As a convenience, the letter "C" may be used in 
 
184
place of a low value in a range to
 
185
indicate "continuous"; its effect if for the previous high value to
 
186
be copied and taken as the next low value.<tt> </tt>
 
187
This saves the tedium and error-prone-ness 
 
188
of having to enter values twice.<tt> </tt>
 
189
<br>
 
190
Example: <tt>valuelist1: 0-2.5 C-5 C-7.5 C-10</tt>
 
191
<br>
 
192
This would be equivalent to <tt>valuelist1: 0-2.5 2.5-5 5-7.5 7.5-10</tt>.<tt> </tt>
 
193
Either way, a value of 2.5 would end up in the 2nd bin.<tt> </tt>
 
194
 
 
195
</dl>
 
196
<p>
 
197
<b>valuelist2</b>
 
198
<dl>
 
199
<dt><dd><p>
 
200
Value list for datafield2.  (see valuelist1)
 
201
 
 
202
</dl>
 
203
<p>
 
204
<b>doranges1</b> <tt>yes | no</tt>
 
205
<dl>
 
206
<dt><dd><p>
 
207
If <tt>yes</tt>, distribution on datafield1 will use ranges rather
 
208
than values.  If defined ranges overlap the higher bin has presidence.<tt> </tt>
 
209
The ranges may be defined using either <tt>valuelist1</tt>, or 
 
210
<tt>rangespec1</tt>.<tt> </tt>
 
211
 
 
212
</dl>
 
213
<p>
 
214
<b>doranges2</b> <tt>yes | no</tt>
 
215
<dl>
 
216
<dt><dd><p>
 
217
If <tt>yes</tt>, distribution on datafield2 will use ranges rather
 
218
than values.  
 
219
The ranges may be defined using either <tt>valuelist2</tt>, or 
 
220
<tt>rangespec2</tt>.<tt> </tt>
 
221
 
 
222
</dl>
 
223
<p>
 
224
<b>rangespec1</b>  <i>lowval  binsize</i>  [<i>hival</i>]
 
225
<dl>
 
226
<dt><dd><p>
 
227
If doing ranges, this attribute may be used instead of <tt>valuelist</tt>
 
228
if ranges of uniform size are to be used when tabulating.<tt> </tt>
 
229
Ranges will begin at <i>lowval</i> and be of size <i>binsize</i>.<tt> </tt>
 
230
Ranges will end when <i>hival</i> is passed, or when the high end
 
231
of the axis is passed (if an axis has been defined).<tt> </tt>
 
232
<i>lowval</i> and <i>hival</i> should be 
 
233
<a href="attributetypes.html#plotvalue">
 
234
plotvalues
 
235
</a>
 
236
 .  Implies <tt>doranges1: yes</tt>.<tt> </tt>
 
237
<br>
 
238
Example: <tt>rangespec1: 0 5 39</tt>
 
239
<br>
 
240
This would set up ranges 0-5, 5-10, 10-15, and so on, up to
 
241
35-40 (remember that where ranges overlap, the higher bin has presidence).<tt> </tt>
 
242
 
 
243
</dl>
 
244
<p>
 
245
<b>rangespec2</b>  <i>lowval  binsize</i>  [<i>hival</i>]
 
246
<dl>
 
247
<dt><dd><p>
 
248
Same as <tt>rangespec1</tt>, but for datafield2.<tt> </tt>
 
249
 
 
250
</dl>
 
251
<p>
 
252
<b>accumfield</b> 
 
253
<a href="attributetypes.html#dfield">
 
254
<i> dfield </i>
 
255
</a>
 
256
<dl>
 
257
<dt><dd><p>
 
258
Normally, proc tabulate works by counting occurances.  However,
 
259
If <tt>accumfield</tt> is specified, instead of counting, an accumulation
 
260
will be done using the specified field.<tt> </tt>
 
261
 
 
262
</dl>
 
263
<p>
 
264
<b>order1</b> <tt>natural | magnitude | reversemagnitude</tt>
 
265
<dl>
 
266
<dt><dd><p>
 
267
Specify order that categories are presented in the result.<tt> </tt>
 
268
 
 
269
</dl>
 
270
<p>
 
271
<b>order2</b> <tt>natural | magnitude | reversemagnitude</tt>
 
272
<dl>
 
273
<dt><dd><p>
 
274
Same as above for datafield2.<tt> </tt>
 
275
 
 
276
</dl>
 
277
<p>
 
278
<b>percents</b>  <tt>yes</tt> | <tt>no</tt>
 
279
<dl>
 
280
<dt><dd><p>
 
281
If yes, each tabulation column will be accompanied by a column of percents.<tt> </tt>
 
282
 
 
283
</dl>
 
284
<p>
 
285
<b>savetable</b> <i>filename</i> | <tt>stdout</tt> | <tt>stderr</tt>
 
286
<dl>
 
287
<dt><dd><p>
 
288
If specified, write tabulation results to the
 
289
given file, standard output or standard error.<tt> </tt>
 
290
 
 
291
</dl>
 
292
<p>
 
293
<b>select</b> 
 
294
<a href="condex.html">
 
295
<i> conditional-expression </i>
 
296
</a>
 
297
<dl>
 
298
<dt><dd><p>
 
299
<i>conditional-expression</i> 
 
300
is applied to each data record (row).<tt> </tt>
 
301
If specified and if the expression evaluates to true, the
 
302
data is included; otherwise it is excluded.<tt> </tt>
 
303
Data fields are referenced by preceding them with
 
304
two at-signs (@).<tt> </tt>
 
305
<br>
 
306
Example: <tt>select: @4 = G</tt>
 
307
 
 
308
</dl>
 
309
<p>
 
310
<b>rangesepchar</b> <i>char</i>
 
311
<dl>
 
312
<dt><dd><p>
 
313
Allows user specification of the range separator character 
 
314
(the character that should be used
 
315
to separate the low and high values of a range in the valuelists).<tt> </tt>
 
316
Default range separator charactor is dash (-).<tt> </tt>
 
317
Example: <tt>rangesepchar: ,</tt>
 
318
 
 
319
</dl>
 
320
<p>
 
321
<b>showrange</b> <tt>low</tt>  |  <tt>avg</tt>
 
322
<dl>
 
323
<dt><dd><p>
 
324
If specified, controls the content of row or column labels 
 
325
when ranges are being used.  Normal behavior is for the
 
326
label to be formatted <i>lowend</i><tt> - </tt><i>hiend</i>.<tt> </tt>
 
327
If this attribute is <tt>low</tt>, only the low value will be given.<tt> </tt>
 
328
If this attribute is <tt>avg</tt>, an average of the low and high
 
329
will be given.<tt> </tt>
 
330
This attribute is useful when proc tabulate result range bins will 
 
331
be plotted by location, e.g. for a histogram (the 1st result data
 
332
field can be used as the bar location).<tt> </tt>
 
333
 
 
334
 
 
335
</dl>
 
336
<p>
 
337
<b>showrangelowonly</b> <tt>yes | no</tt>
 
338
<dl>
 
339
<dt><dd><p>
 
340
[Superceded by the <tt>showrange</tt> attribute.]
 
341
If <tt>yes</tt> and if ranges are being used, show only the low 
 
342
part of the range in the results.  
 
343
 
 
344
 
 
345
<br>
 
346
<br>
 
347
</td></tr>
 
348
<td align=right>
 
349
<a href="../doc/Welcome.html">
 
350
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine &nbsp; <br>
 
351
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
 
352
<br>
 
353
<br>
 
354
<center>
 
355
<img src="../gallery/all.gif">
 
356
</center>
 
357
</td></tr>
 
358
</table>
 
359
</dl>
 
360
<p><hr>
 
361
Markup created by <em>unroff</em> 1.0,&#160;<tt> </tt>&#160;<tt> </tt>March 01, 2002.
 
362
</body>
 
363
</html>