DADiSP Worksheet Functions > Function Categories > Data Manipulation and Editing > REPCOLUMN

 

REPCOLUMN

Purpose:

Replicates the columns of a series.

Syntax:

REPCOLUMN(series, n)

series

-

A series, the input to replicate.

n

-

An integer. The number of times the columns should be replicated.

Returns:

A series with n times the number of columns of the original series.

Example:

W1: repcolumn({1, 2}, 3)

 

W1 == {{1, 1, 1},

       {2, 2, 2}}

Example:

W1: ravel(1..12, 4)

W2: repcol(W1, 2)

 

W1 == {{1, 5,  9},

       {2, 6, 10},

       {3, 7, 11},

       {4, 8, 12}}

 

W2 == {{1, 5,  9, 1, 5,  9},

       {2, 6, 10, 2, 6, 10},

       {3, 7, 11, 3, 7, 11},

       {4, 8, 12, 4, 8, 12}}

Remarks:

REPCOLUMN can be abbreviated REPCOL.

 

See REPLICATE to replicate the rows.

 

See REPMAT to replicate both rows and columns.

 

See REPELEMENTS to replicate the individual elements of a series.

See Also:

CONCAT

EXTRACT

MERGE

RAVEL

REPELEMENTS

REPLICATE

REPMAT