jeudi 26 mai 2016

How do you generate a random matrix in R with a constant colSum value?

I'm looking for a way to generate a series of matrices where all the column sums are equal to a specific value. I thought I could generate random matrices and check each one to filter out where colSums= value needed, but that doesn't seem to work. Also, how do we generate random matrices in R with both positive and negative values?




Aucun commentaire:

Enregistrer un commentaire