[R] random selection of elements from a matrix

2011-07-14 Thread anaraster
Hi! How can I make a random selection of n row elements from a matrix. The matrix was previously created from a table with different rows and columns. However I want to keep all the information (columns), I just want to reduce the number of observations. Thanks, Ana -- View this message in

Re: [R] random selection of elements from a matrix

2011-07-14 Thread anaraster
ups...already found the solution matrix2 - matrix1[sample(samplenumber,replace=F),] -- View this message in context: http://r.789695.n4.nabble.com/random-selection-of-elements-from-a-matrix-tp3668574p3668594.html Sent from the R help mailing list archive at Nabble.com.