next up previous contents
Next: Converting fields of a Up: Basic operations for managing Previous: Handling classified data frames

Creating a data field as a number series

 

serie Create a series of numbers
{-d <data> existing data,
| -len <length>} or length of the field, alternatively
-fout <field-name> field to be generated
[-start <start-value>] minimum value for series (or 0)
[-step <step-value>] step between the values (or 1)

This command creates a new data field by generating numeric values. The values are created by starting from the <start-value>, and by increasing the generated value by <step-value> each time. The <step-value> can be zero or negative, too. Length of the resulted field can be given through the reference data or as a parameter.

Example: The following example demonstrates how identifiers can be generated for data records.

NDA> load boston.dat
NDA> serie -d boston -fout boston.id -start 0 -step 1
NDA> getdata boston.id
1                           # Type = 1 (integer)
0                           # The created series
1
2
3
...


next up previous contents
Next: Converting fields of a Up: Basic operations for managing Previous: Handling classified data frames

Anssi Lensu
Tue Jul 23 11:58:18 EET DST 2002