[R] 3D histogramm

2006-11-30 Thread Céline Henzelin
thank you for your answer i checked my code and it now works One more question... do you know how to have an 3D histogramm from a known matrix of probabilities Cline From: David Barron [EMAIL PROTECTED] To: Céline Henzelin [EMAIL PROTECTED], r-help r-help@stat.math.ethz.ch Subject: Re: [R

[R] (no subject)

2006-11-18 Thread Céline Henzelin
Hello, I need help to understand my error in this code... I would like to make a direct sampler... thanks Celine p-matrix(c(1,2,3,2,1,4),3,2,byrow=T) p-p/sum(p) ky-ncol(p) kx-nrow(p) p.vec-as.vector(t(p)) l-rmultinom(1,1,p) l-(t(l)) m-(l%%ky) ifelse (m==0, i-l/ky (j-ky), i-((l/ky)+1)