sortieren Ich bekomme, wie Test neu zu ordnen, so dass das 13. Element des Vektors geht zuerst dann 7. Sekunde nach der Ind Reihenfolge. ABER, wie mache ich das Umgekehrte, so dass "Blah1" das 13. Element des neuen Vektors werden würde? Dann wird das nächste Element 'blah1' wäre dann das siebte Element des neuen Vektors ... und so weiter ...Wie R Vektor nach einem Vektor in Indizes
Test [1] "blah1" "blah1" "blah1" "blah1" " blah2 "" blah2 "" blah2 "" blah2 "" blah2 "" blah2 "" blah2 "" blah2 "" blah2 " ind [1] 13 7 3 10 5 6 4 2 12 9 1 11 8 test [ind] [1] "blah2" "blah2" "blah1" "blah2" "blah2" "blah2" "blah1" "blah1" "blah2" "blah2" "blah1" "blah2" "blah2"
OR alternativ
v < - c ('a', 'b', 'c') ind < - c (3,2,1)
neu v < - Funktion (V ind)
neue v 'c', 'b', 'a'
Holen Sie es? Vielen Dank.
Dank das hat sehr geholfen! –