Re: [R] Sampling a matrix with different probability distributions

2009-05-05 Thread Silvia Lomascolo
g) L. Snow Ph.D. > Statistical Data Center > Intermountain Healthcare > greg.s...@imail.org > 801.408.8111 > > >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- >> project.org] On Behalf Of Silvia Lomascolo >> Sent

Re: [R] Sampling a matrix with different probability distributions

2009-05-05 Thread Greg Snow
...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Silvia Lomascolo > Sent: Tuesday, May 05, 2009 9:52 AM > To: r-help@r-project.org > Subject: [R] Sampling a matrix with different probabi

[R] Sampling a matrix with different probability distributions

2009-05-05 Thread Silvia Lomascolo
I need to sample a matrix according to different distributions, instead of just randomly. Here is some code that will hopefully clarify what I need: I have a matrix M of 1287 interactions between species in rows and species in columns, according to their abundance: pla<- c(10, 9, 6, 5, 3) #abun