我有一个名字列表,我想按R值升序排序。[1] "W2345_S-001-R2-20D.datavalue.csv" "W2346_S-001-R4-20D.datavalue.csv"
[3] "W2347_S-001-R1-20D.datavalue.csv" "W2348_S-001-R3-20D.datavalue.csv"
[5] "W2349_S-001-R5-20D.datavalue.csv"
然而,mixedsort
只给出了上面的结果(按W值排序),但我想按R1、R2、R3、R4、R5排列它们,忽略名称中包含的其他数字。[1] "W2347_S-001-R1-20D.datavalue.csv" "W2345_S-001-R2-20D.datavalue.csv"
[3] "W2348_S-001-R3-20D.datavalue.csv" "W2346_S-001-R4-20D.datavalue.csv"
[5] "W2349_S-001-R5-20D.datavalue.csv"
2条答案
按热度按时间dz6r00yl1#
6l7fqoea2#