Displaying 1 result from an estimated 1 matches for "mmtabl".
Did you mean:
mmtable
2012 Jan 29
2
How do I turn NA's to zeroes when a combination lacks one element?
...size of 55 with the probabilities of each
color being chosen as: .24, .24, .16, .20, .13, .14. Here is what I've come
up with...
sample.size<- 55
MM.probability<- c(.24, .24, .16, .20, .13, .14)
MM.color<- c('Bl','Br','G','O','R','Y')
mmtable<- matrix(nrow = 1000, ncol = 6)
for(i in 1:1000){
combinations<- sample(MM.color, sample.size, replace = T, prob =
MM.probability)
mmtable[i,]<-table(combinations)
colnames(mmtable)<- c("Bl","Br","G","O","R","Y")
}
I feel lik...