Re: [R] Swap rows and columns in a matrix

2012-10-30 Thread David Winsemius
> > > > - Original Message - > From: David Winsemius > To: Haris Rhrlp > Cc: "R-help@r-project.org" > Sent: Tuesday, October 30, 2012 6:51 PM > Subject: Re: [R] Swap rows and columns in a matrix > > > On Oct 30, 2012, at 11:59 AM, Haris Rh

Re: [R] Swap rows and columns in a matrix

2012-10-30 Thread arun
Swap rows and columns in a matrix On Oct 30, 2012, at 11:59 AM, Haris Rhrlp wrote: > Dear R users, > > I want a help to write an algorithm for swapping rows and columns in a matrix > This will "shuffle" columns, although 'randomly permute' is the more common w

Re: [R] Swap rows and columns in a matrix

2012-10-30 Thread David Winsemius
On Oct 30, 2012, at 11:59 AM, Haris Rhrlp wrote: > Dear R users, > > I want a help to write an algorithm for swapping rows and columns in a matrix > This will "shuffle" columns, although 'randomly permute' is the more common word for this;operation: set.seed(123) mat[, sample(dim(mat)[2] ]

Re: [R] Swap rows and columns in a matrix

2012-10-30 Thread Rolf Turner
On 31/10/12 07:59, Haris Rhrlp wrote: Dear R users, I want a help to write an algorithm for swapping rows and columns in a matrix thanks in advance ?t (???) cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.et

Re: [R] Swap rows and columns in a matrix

2012-10-30 Thread Federman, Douglas
Does the builtin function 't' work for your needs? -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Haris Rhrlp Sent: Tuesday, October 30, 2012 3:00 PM To: R-help@r-project.org Subject: [R] Swap rows and columns in a matr

[R] Swap rows and columns in a matrix

2012-10-30 Thread Haris Rhrlp
Dear R users, I want a help to write an algorithm for swapping rows and columns in a matrix thanks in advance [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read