Displaying 2 results from an estimated 2 matches for "2_9".
Did you mean:
29
2011 Dec 07
4
bug in rank(), order(), is.unsorted() on character vector
Hi,
This looks OK:
> x <- c("_1_", "1_9", "2_9")
> rank(x)
[1] 1 2 3
But this does not:
> xa <- paste(x, "a", sep="")
> xa
[1] "_1_a" "1_9a" "2_9a"
> rank(xa)
[1] 2 1 3
Cheers,
H.
> sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: x86_64-unknown-linux-gnu (64...
2007 Apr 04
2
selection of character
...ot;11_6" "12_6" "1_6" "2_6" "3_6"
[31] "4_6" "5_6" "6_6" "7_6" "8_6" "9_6" "1_7" "1_8" "2_8" "3_8"
[41] "10_9" "1_9" "2_9" "3_9" "4_9" "5_9" "6_9" "7_9" "8_9" "9_9"
[43] "1_10" "2_10"
and I'd like to have a vector with only the value after the under scor,
like this:
[1] "1" "1" "1&quo...