[R] how to order each element according to alphabet

onthetopo jint83 at sina.com
Fri Jul 15 03:18:28 CEST 2011


Hi there,

  I have a large amino acid csv file like this:

input.txt:
P,LV,Q,Z
P,VL,Q,Z
P,ML,QL,Z

There is a problem with this file, since LV and VL are in fact the same
thing.   
How do I order each element according to alphabetical order so that the
desired output would look like:

output.txt:
P,LV,Q,Z
P,LV,Q,Z
P,LM,LQ,Z




--
View this message in context: http://r.789695.n4.nabble.com/how-to-order-each-element-according-to-alphabet-tp3668997p3668997.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list