Message-ID: <1307514811278-3581752.post@n4.nabble.com>
Date: 2011-06-08T06:33:31Z
From: the_big_kowalski
Subject: determine frequencies in a matrix by row
In-Reply-To: <1307514202165-3581733.post@n4.nabble.com>
here's the code to generate the matrix
set.seed(1)
types = c(1,2,3)
n=5
p=1
pop.props = c(0.6,0.2,0.2)
x=matrix(pop.props,nrow=n,ncol=length(pop.props), byrow=T)
b=10
habs = rMultinom((x),b)
print(habs)
--
View this message in context: http://r.789695.n4.nabble.com/determine-frequencies-in-a-matrix-by-row-tp3581733p3581752.html
Sent from the R help mailing list archive at Nabble.com.