[R] determine frequencies in a matrix by row
the_big_kowalski
bkowalski at csumb.edu
Wed Jun 8 08:33:31 CEST 2011
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.
More information about the R-help
mailing list