[R] Problem

Ambrosini Alessandro klavan at tiscalinet.it
Thu May 2 23:42:46 CEST 2002


Hello.
I have a vector of about 1000 words. Now I make an example with 5 words.
The vector is
a b c d e
after some works I obtained a matrix with the vector in the first row as

aa bb cc dd ee
1  0  1  1  0

After other passage I obtained another vector that has the same words but
that not the same order of the first one. I obtained

dd ee cc aa bb

Now my problem is to find a new matrix starting from the one that I wrote
before, changing the position of the columns, according to the order of the
second vector.
Using the example I want to obtain

dd ee cc aa bb
1  0  1  1  0

The real vector is very long and so I can't make  change of position of the
columns manually.
Thank you
Alessandro

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list