Split Command
Gregory Lypny
gregory.lypny at videotron.ca
Fri Mar 22 13:33:01 EST 2002
Hi Everyone,
I'm wondering whether the Split command can be used to create a
numerical matrix from a tab-delimited field of numbers. Example: I
have a field named "X" with N=1000 rows and K=10 columns for 10,000
observations in total. The data is tab-delimited, and each line ends
with the Return character. If I put field "X" into variable X and use
split X by tab
I get a single vector instead of a matrix (which I expected because
that's how the command is defined), but the dimension of the vector is 1
x 9,001 rather than 1 x 10,000 because the first element of each row is
skipped during the indexing process (999 rows), being delimited by
Return rather than Tab. I would like to be able to create an NxK matrix
where each element is X[i,j] (i=row and j=column) and be able to
extract single-indexed Nx1 column vectors of the form X[j] --- X[1],
X[2], ..., X[10] in my example here. I know that I can build these
easily using the repeat control structure, but I thought that a command
like Split, or something similar, may already exist for this purpose.
Regards,
Greg
More information about the metacard
mailing list