STATISTICA







Using STADEV with STATISTICA BASIC
Modifying an existing data file

This example adds a variable to an existing data file, fills it with some numbers, and then adds two value labels.

Note that to use STADEV from STATISTICA BASIC you must put stadev.dll and stadev.inc files in the STATISTICA directory, include the development environment include file at the beginning of the program {$I:'stadev.inc'}, and call the appropriate functions.


{$I:'stadev.inc'}
handle := StaOpenFile ("c:\data.sta");
  {add variable number 5}
StaAddVars (handle, 4, 1);
  {set new variable name}
StaSetVarName (handle, 5, "BHPH");
  {insert some values}
NC := StaGetNCases (handle);
for i := 1 to NC do
  StaSetData (handle, 5, i, i * 10);
  {add text labels}
StaAddLabel (handle, 5, 10, "A", "long label for A");
StaAddLabel (handle, 5, 20, "B", "long label for B");
  {close the handle}
StaCloseFile (handle);
Back to List of Programs



[StatSoft]
2300 East 14th Street, Tulsa, OK 74104
Phone: (918) 749-1119; Fax: (918) 749-2217

[StatSoft]e-mail: info@statsoft.com

©Copyright StatSoft, Inc., 1984-2004.
StatSoft, StatSoft logo, STATISTICA, SEWSS, SEDAS, Data Miner, SEPATH and GTrees are trademarks of StatSoft, Inc.