a <- dirichlet(1:3)
triplot(a,l=20)
old.par <- par(no.readonly=TRUE);par(xpd=TRUE) # (needed for labels)
pnames(a) <- letters[1:3]
triplot(a,l=33)
f <- function(p){1-p[1]+p[2]+8*p[2]^2*p[3]}
triplot(f,labels=LETTERS[1:3])
g <- function(p){dhyperdirichlet(p, a, log=FALSE)}
triplot(g,l=20)
par(old.par)
Run the code above in your browser using DataLab