COLLENGTH

Purpose:

Produces a row of the lengths of each column of the input table.

Syntax:

COLLENGTH(a, unravel)

a

-

A series or multi-column table.

unravel

-

Optional. An integer indicating if "unraveled" (i.e. sequential) lengths should be returned:

0:

Normal indices (default)

1:

Unraveled (sequential) indices

Returns:

A one-row table with the same number of columns as the input table.

Example:

a = ravel({1, 2, 6, 4, 5}, {1, 3})

b = collength(a)

 

a == {{1, 1},

      {2, 3}, 

       6, 

       4, 

       5} 

 

b == {{5, 2}}

 

c = collength(a, 1)

d = a[c]

 

c == {{5, 7}}

d == {{5, 3}}

Remarks:

COLLENGTH(a, 1) returns the lengths in sequential, unraveled order equivalent to a running total of the column lengths. This form is useful in array reference expressions.

 

COLLENGTH can be abbreviated as COLLEN.

See Also:

COL

COLMAX

COLMEAN

COLMEDIAN

COLMIN

COLSTDEV

LENGTH

ROWLEN

SIZE

TRANSPOSE