I have matirx, it's column names have two part, I just want to keep the first part.
>colnames(mymatrix)
[1] "AF|2312" "BWDS|54" "JFD|2111"
so I just want to keep part of colnames before |
How can I implement it in R ?
See Question&Answers more detail:os