Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > ed05dc5f357c49fdded780f52b150dce > files > 123

ploticus-2.41-2mdv2010.0.i586.rpm

<html>
<head>
<!-- This file has been generated by unroff 1.0, 03/11/09 12:56:23. -->
<!-- Do not edit! -->
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
        OL,UL,P,BODY,TD,TR,TH,FORM { font-family: arial,helvetica,sans-serif;; font-size:small; color: #333333; }

        H1 { font-size: x-large; font-family: arial,helvetica,sans-serif; }
        H2 { font-size: large; font-family: arial,helvetica,sans-serif; }
        H3 { font-size: medium; font-family: arial,helvetica,sans-serif; }
        H4 { font-size: small; font-family: arial,helvetica,sans-serif; }
-->
</STYLE>
<title>ploticus: proc tabulate</title>
<body bgcolor=D0D0EE vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550><tr>
<td>
  <table cellpadding=2 width=550><tr>
  <td><br><h2>proc tabulate</h2></td>
  <td align=right>
  <small>
  <a href="../doc/welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
  Version 2.41 Mar2009
     </small><br><a href="../doc/scripthome.html">Scripts</a>
  <td></tr></table>
</td></tr>
<td>
<br>
<br>

<title>Manual page for proc_tabulate(PL)</title>
</head>
<body>
 
<p>
<b>proc tabulate</b> uses the
<a href="dataformat.html#currentds">
 current data set
</a>
to compute a one-way distribution on one 
data field, or a two-way distribution using two data fields.<tt> </tt>
It produces a new data set,
which becomes the "current" data set, ie. the data that will be accessed
by subsequently executed plotting procs.<tt> </tt>
<p>
<b>proc tabulate</b> has a fixed maximum of 200 rows and 200 columns.<tt> </tt>
Data does not have to be ordered in any particular way.<tt> </tt>
<p>
The <tt>showresults</tt> option is recommended so that you can see
what the resulting data set looks like while developing a plot.<tt> </tt>

<br><br><br>

<h2>Note</h2>
We recommend using 
<a href="processdata.html">
 proc processdata (action: count)
</a>
to do tabulations if possible,
however this requires that input be sorted.  Proc tabulate may still be useful when it's necessary to 
tabulate on unsorted input data, and perhaps in certain other situations.<tt> </tt>

<br><br><br>

<h2>Variables set by proc tabulate</h2>
<p>
<b>NRECORDS</b> = Number of rows in the data result.<tt> </tt>
<p>
<b>NFIELDS</b> = Number of fields per row in the data result.<tt> </tt>
<p>
Thus, if a one-way distribution is being done and there are 7 varieties,
NRECORDS will hold 7, which may then be used (e.g. xrange: @NRECORDS+1) 
to automatically set scaling for a bargraph.<tt> </tt>

<br><br><br>

<h2>MODES</h2>
Either one-dimensional or two-dimensional modes.<tt> </tt>
<p>
If <tt>datafield1</tt> is specified but <tt>datafield2</tt> is not,
a <b>one-dimensional</b> distribution will be computed.<tt> </tt>
The result will be two data fields-- the first field
will be the value and the second field will be the number of
instances.  The number of records in the result will be
the number of bins.<tt> </tt>
<p>
If both <tt>datafield1</tt> and <tt>datafield2</tt> are specified
then a <b>two-dimensional</b> distribution will be computed.<tt> </tt>
Datafield1 will be distributed downward and datafield2
will be distributed across.  
The result's column headings will be usable as field names
(the first column is always named <tt>rowname</tt>).<tt> </tt>
<p>
Many of the attributes are named with either 1 or 2
to correspond with either the distribution on
datafield1, or datafield2.<tt> </tt>

<h2>NOTE</h2>
After <b>proc tabulate</b> executes, all subsequent plotting
procedures in the script file will access its results 
for plotting.  However,
the original data is still in memory.  If later it is
necessary to plot the original data, <b>proc usedata</b>
may be invoked.<tt> </tt>



<h2>MANDATORY ATTRIBUTES</h2>
The <tt>datafield1</tt> attribute must be specified.<tt> </tt>
<p>
If a <tt>valuelist</tt> is not specified, all values encountered will
get their own bin in the distribution.<tt> </tt>


<h2>ATTRIBUTES</h2>
<p>
<b>datafield1</b> 
<a href="attributetypes.html#dfield">
<i> dfield </i>
</a>
<dl>
<dt> <dd>
Compute a distribution on this data field.<tt> </tt>
Value will be in result data field 1 and N will be
in result data field2.<tt> </tt>
Example: <tt>datafield1: 1</tt>

</dl>
<p>
<b>datafield2</b> 
<a href="attributetypes.html#dfield">
<i> dfield </i>
</a>
<dl>
<dt> <dd>
Compute a two way distribution on datafield1 and this field.<tt> </tt>
Distribution on datafield2 will be horizontal.<tt> </tt>
See also MODES above.<tt> </tt>
Example: <tt>datafield2: 5</tt>

</dl>
<p>
<b>axis1</b> <tt>x | y</tt>
<dl>
<dt> <dd>
Axis to equivicate with the distribution on datafield1.<tt> </tt>
This needs to be specified when working with 
data which is to be scaled using units such as date or time.<tt> </tt>
Otherwise it does not need to be specified.<tt> </tt>

</dl>
<p>
<b>axis2</b> <tt>x</tt>|<tt>y</tt>
<dl>
<dt> <dd>
Same as <tt>axis1</tt>, but goes with datafield2.<tt> </tt>

</dl>
<p>
<b>valuelist1</b> <i>stringlist</i>
<dl>
<dt> <dd>
Define a set of values that will be included in the distribution
of datafield1.<tt> </tt>
The ordering of this set determines the order that categories 
are presented in the result.  
This is a space- or comma-delimited list of values.  
<br>
Example: <tt>valuelist: red green blue</tt>
<dt> <dd>
If ranges are being used (<tt>dorange1: yes</tt>), then this attribute
may be used to explicitly define the ranges.  See the following example for
the syntax; by default, dash (-) is used to separate the low and hi
values in a range, with no embedded spaces allowed.<tt> </tt>
<dt> <dd>
As a convenience, the letter "C" may be used in 
place of a low value in a range to
indicate "continuous"; its effect if for the previous high value to
be copied and taken as the next low value.<tt> </tt>
This saves the tedium and error-prone-ness 
of having to enter values twice.<tt> </tt>
<br>
Example: <tt>valuelist1: 0-2.5 C-5 C-7.5 C-10</tt>
<br>
This would be equivalent to <tt>valuelist1: 0-2.5 2.5-5 5-7.5 7.5-10</tt>.<tt> </tt>
Either way, a value of 2.5 would end up in the 2nd bin.<tt> </tt>

</dl>
<p>
<b>valuelist2</b>
<dl>
<dt> <dd>
Value list for datafield2.  (see valuelist1)

</dl>
<p>
<b>doranges1</b> <tt>yes | no</tt>
<dl>
<dt> <dd>
If <tt>yes</tt>, distribution on datafield1 will use ranges rather
than values.  If defined ranges overlap the higher bin has presidence.<tt> </tt>
The ranges may be defined using either <tt>valuelist1</tt>, or 
<tt>rangespec1</tt>.<tt> </tt>

</dl>
<p>
<b>doranges2</b> <tt>yes | no</tt>
<dl>
<dt> <dd>
If <tt>yes</tt>, distribution on datafield2 will use ranges rather
than values.  
The ranges may be defined using either <tt>valuelist2</tt>, or 
<tt>rangespec2</tt>.<tt> </tt>

</dl>
<p>
<b>rangespec1</b>  <i>lowval  binsize</i>  [<i>hival</i>]
<dl>
<dt> <dd>
If doing ranges, this attribute may be used instead of <tt>valuelist</tt>
if ranges of uniform size are to be used when tabulating.<tt> </tt>
Ranges will begin at <i>lowval</i> and be of size <i>binsize</i>.<tt> </tt>
Ranges will end when <i>hival</i> is passed, or when the high end
of the axis is passed (if an axis has been defined).<tt> </tt>
<i>lowval</i> and <i>hival</i> should be 
<a href="attributetypes.html#plotvalue">
plotvalues
</a>
 .  Implies <tt>doranges1: yes</tt>.<tt> </tt>
<br>
Example: <tt>rangespec1: 0 5 39</tt>
<br>
This would set up ranges 0-5, 5-10, 10-15, and so on, up to
35-40 (remember that where ranges overlap, the higher bin has presidence).<tt> </tt>

</dl>
<p>
<b>rangespec2</b>  <i>lowval  binsize</i>  [<i>hival</i>]
<dl>
<dt> <dd>
Same as <tt>rangespec1</tt>, but for datafield2.<tt> </tt>

</dl>
<p>
<b>accumfield</b> 
<a href="attributetypes.html#dfield">
<i> dfield </i>
</a>
<dl>
<dt> <dd>
Normally, proc tabulate works by counting occurances.  However,
If <tt>accumfield</tt> is specified, instead of counting, an accumulation
will be done using the specified field.<tt> </tt>

</dl>
<p>
<b>order1</b> <tt>natural | magnitude | reversemagnitude</tt>
<dl>
<dt> <dd>
Specify order that categories are presented in the result.<tt> </tt>

</dl>
<p>
<b>order2</b> <tt>natural | magnitude | reversemagnitude</tt>
<dl>
<dt> <dd>
Same as above for datafield2.<tt> </tt>

</dl>
<p>
<b>percents</b>  <tt>yes</tt> | <tt>no</tt>
<dl>
<dt> <dd>
If yes, each tabulation column will be accompanied by a column of percents.<tt> </tt>

</dl>
<p>
<b>numfmt</b>  
<a href="attributetypes.html#prinfspec">
 printf-spec
</a>
<dl>
<dt> <dd>
Sets the internal representation of numeric quantities.  Default is <tt>%g</tt> but other
formats may be useful in working with very large or very small numbers.<tt> </tt>

</dl>
<p>
<b>showresults</b>  <tt>yes</tt> | <tt>no</tt>
<dl>
<dt> <dd>
If <tt>yes</tt>, the result data table will be written to the diagnostic stream for debugging purposes.<tt> </tt>


</dl>
<p>
<b>savetable</b> <i>filename</i> | <tt>stdout</tt> | <tt>stderr</tt>
<dl>
<dt> <dd>
[This attribute superseded by <b>showresults</b> above]

</dl>
<p>
<b>select</b> 
<a href="select.html">
 select expression
</a>
<dl>
<dt> <dd>
Select data rows for inclusion.<tt> </tt>
<br>
Example: <tt>select: @4 = G</tt>

</dl>
<p>
<b>rangesepchar</b> <i>char</i>
<dl>
<dt> <dd>
Allows user specification of the range separator character 
(the character that should be used
to separate the low and high values of a range in the valuelists).<tt> </tt>
Default range separator charactor is dash (-).<tt> </tt>
Example: <tt>rangesepchar: ,</tt>

</dl>
<p>
<b>showrange</b> <tt>low</tt>  |  <tt>avg</tt>
<dl>
<dt> <dd>
If specified, controls the content of row or column labels 
when ranges are being used.  Normal behavior is for the
label to be formatted <i>lowend</i><tt> - </tt><i>hiend</i>.<tt> </tt>
If this attribute is <tt>low</tt>, only the low value will be given.<tt> </tt>
If this attribute is <tt>avg</tt>, an average of the low and high
will be given.<tt> </tt>
This attribute is useful when proc tabulate result range bins will 
be plotted by location, e.g. for a histogram (the 1st result data
field can be used as the bar location).<tt> </tt>

</dl>
<p>
<b>resultfieldnames</b> <i>commalist</i>
<dl>
<dt> <dd>
Field names for the resulting data set.<tt> </tt>
Example: <tt>resultfieldnames: name, count, pct</tt>

<br>
<br>
</td></tr>
<td align=right>
<a href="../doc/welcome.html">
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine &nbsp; <br>
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
<br>
<br>
<center>
<img src="../gallery/all.gif"> 
</center>
</td></tr>
</table>
<br>
<center>
<table><tr><td>
Ploticus is hosted at http://ploticus.sourceforge.net</td><td> &nbsp; </td><td>
<a href="http://sourceforge.net/projects/ploticus"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=38453&type=12" 
width="120" height="30" border="0" 
alt="Get ploticus data display engine at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a>
</td></tr></table>


</center>
</dl>
<p><hr>
Markup created by <em>unroff</em> 1.0,&#160;<tt> </tt>&#160;<tt> </tt>March 11, 2009.
</body>
</html>