Hello,
I?m new to Splus and I have a question about a data transformation. I have a
symmetric matrix of 3000x3000 and I want to use the observations within one
column to change all the values of another column to zero. For example, in the
simple data set below, every time I find a 1 in column 1, I want all the cases
in the ith column to be zero (excluding the first column). In other words,
column 1 is fixed, and whenever a 1 is encountered in row j, the jth column is
set equal to 0, except for j=1.
1 0 0 1 0 0 0 0 1 0
0 1 1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1
The data above should convert to
1 0 0 0 0 0 0 0 0 0
0 1 1 0 1 1 1 1 0 1
0 1 1 0 1 1 1 1 0 1
1 1 1 0 1 1 1 1 0 1
0 1 1 0 1 1 1 1 0 1
0 1 1 0 1 1 1 1 0 1
0 1 1 0 1 1 1 1 0 1
0 1 1 0 1 1 1 1 0 1
1 1 1 0 1 1 1 1 0 1
0 1 1 0 1 1 1 1 0 1
Thanks for any help.
Greg Bond
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|