Re: [R] matrix manipulation problem

2009-09-01 Thread Charles C. Berry
On Tue, 1 Sep 2009, Gregory Gentlemen wrote: Dear fellow R-users, Say we have a matrix x, defined as follows set.seed(50) x <- matrix(rbinom(100*5,1, p=0.75),nrow=100, ncol=5) Now the interpretation of x is that each for of x is actually a sequence of length 5, and i would like to transform

[R] matrix manipulation problem

2009-09-01 Thread Gregory Gentlemen
Dear fellow R-users, Say we have a matrix x, defined as follows set.seed(50) x <- matrix(rbinom(100*5,1, p=0.75),nrow=100, ncol=5) Now the interpretation of x is that each for of x is actually a sequence of length 5, and i would like to transform x in such a way that I can describe the frequen