Re: [R] combining column having same values

2013-03-06 Thread Rui Barradas
Hello, Try x <- scan(text = " 1 1 3 2 3 1 1 2 3 3 2") sapply(unique(x), function(.x) which(x == .x)) Hope this helps, Rui Barradas Em 06-03-2013 11:26, eliza botto escreveu: Dear useRs, I have a matrix in the following form [,1] [,2]

Re: [R] combining column having same values

2013-03-06 Thread arun
a #[1] 1 2 6 7 #$c #[1]  4  8 11 #$b #[1]  3  5  9 10 A.K. - Original Message - From: eliza botto To: "r-help@r-project.org" Cc: Sent: Wednesday, March 6, 2013 6:26 AM Subject: [R] combining column having same values Dear useRs, I have a matrix in the following form [,1]  [,2] 

Re: [R] combining column having same values

2013-03-06 Thread ONKELINX, Thierry
ject.org [mailto:r-help-boun...@r-project.org] Namens eliza botto Verzonden: woensdag 6 maart 2013 12:26 Aan: r-help@r-project.org Onderwerp: [R] combining column having same values Dear useRs, I have a matrix in the following form [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,

[R] combining column having same values

2013-03-06 Thread eliza botto
Dear useRs, I have a matrix in the following form [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] 1 1 3 2 3 1 1 2 3 3 2 and following is my desired output (combining the column headers, having same values)