> myProbs[ which(ntype == 0)] <- 0.75/7 # Divide so the sum will be 1.0 > myProbs[ which(ntype == 1)] <- 0.25/3
Here of course you need to divide by number of 0s and 1s, 7 and 3 were was just an example. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.