[R] help on data frame and matrix

2006-09-17 Thread Finosaur
Hey, I am given a data frame, which actually contains a matrix. But I need to convert the data frame into a matrix so that I can use the matrix operators. Can anybody help me out? Thanks a lot. Thaleia [[alternative HTML version deleted]]

[R] help on sampling from Dirichlet process

2006-09-17 Thread Finosaur
Hey, I have a question on Dirichlet process. I am using a Dirichlet process as a prior. So I end up with a mixture distribution with a continuous component and a random number of discrete components at some mass-points. I tried some algorithms, but it's too too inefficient. Anyone know some