CoHort Software |
CoStat Without the GUI
how to do data manipulation and statistics from the
batch files, shell scripts, pipes,
Java programs, Perl, Python, Rexx, Tcl, etc.)
You can bypass the graphical front end of CoStat
in order to do data manipulate and statistics from the
command line, batch files, shell scripts, pipes,
Java programs, Perl, Python, Rexx, Tcl, etc.
When you run CoStat, you are really running a graphical front end to
a large number of Java classes. You can also get access to all of these
classes via a Java class called CoData
(which comes with CoStat). There are two ways
to use CoData:
Documentation and examples of this are in the CoStat manual
(see "CoData" in the index).
- CoData is a text-mode program
which can run a CoData macro file
(an actual file or a stream from a pipe).
CoData's macro language is a subset of Java.
This approach is useful if you want to write another program
(in any language) to
generate a CoData macro file on the fly (for example, on a
server), pipe that into CoData, and pipe the results into
some other program.
- CoData is a Java class, so you can write another Java source code
file which extends CoData, thereby gaining access to all of the
procedures in CoData.
This approach is useful if you want write a Java program that
uses the services that CoData provides (basically, all of the
data manipulation and statistical analysis procedures in CoStat).
To use this approach, you can write your program in Java and
use a Java compiler (Java Developer Kits are freely available from
Sun and other companies).
Or, you can write your program in another language that can
access Java procedures (for example,
Perl, Python, Rexx, or Tcl).
One big advantage of programming with CoStat (as opposed to other
statistical programs that support programming, like SAS) is that CoStat has
procedures to extract the individual results from a statistics procedure,
not just the printout of the results.
As a simple example: if you do a linear regression, you can get
the resulting equation in the form of a string ("4.213 + 3.475*x")
or you can get the intercept (4.213), the slope (3.475),
and the R^2 value separately.
This makes CoStat ideal for use as a statistics engine for your
CoHort Software |