Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

ROWCAT Function

concatenates rows without using blank compression

ROWCAT( matrix<, rows<, columns>>);

The inputs to the ROWCAT function are as follows:
matrix
is a character matrix or quoted literal.

rows
select the rows of matrix.

columns
select the columns of matrix.
The ROWCAT function takes a character matrix or submatrix as its argument and creates a new matrix with one column whose elements are the concatenation of all row elements into a single string. If the argument has n rows and m columns, the result willhave n rows and 1 column. The element length of the result will be m times the element length of the argument. The optional rows and columns arguments may be used to select which rows and columns are concatenated. For example, the statements
   b={"ABC"  "D  "  "EF ",
      " GH"  " I "  " JK"};
   a=rowcat(b);
produce the 2 ×1 matrix:
      A        2 rows      1 col     (character, size 9)

                        ABCD  EF
                         GH I  JK
Quotes (") are needed only if you want to embed blanks or special characters or to maintain uppercase and lowercase distinctions.

The form

ROWCAT( matrix, rows, columns)

returns the same result as

ROWCAT( matrix[rows, columns])

The form

ROWCAT( matrix, rows)

returns the same result as

ROWCAT( matrix[rows,])

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.