Re: [R] Sampling from a Matrix

2006-08-10 Thread Daniel Gerlanc
Once again, thanks for your help. I did not state the problem correctly, though the code is correct for what I want to do. A better description of the problem would be that there is a matrix of probabilities: set.seed(1) probs - array(abs(rnorm(25, sd = 0.33)), dim = c(5,5), dimnames =

Re: [R] Sampling from a Matrix

2006-08-09 Thread Marc Schwartz (via MN)
On Tue, 2006-08-08 at 14:10 -0400, Liaw, Andy wrote: From: Marc Schwartz On Fri, 2006-08-04 at 12:46 -0400, Daniel Gerlanc wrote: Hello all, Consider the following problem: There is a matrix of probabilities: set.seed(1) probs - array(abs(rnorm(25, sd = 0.33)),

Re: [R] Sampling from a Matrix

2006-08-08 Thread Liaw, Andy
From: Marc Schwartz On Fri, 2006-08-04 at 12:46 -0400, Daniel Gerlanc wrote: Hello all, Consider the following problem: There is a matrix of probabilities: set.seed(1) probs - array(abs(rnorm(25, sd = 0.33)), dim = c(5,5), dimnames = list(1:5, letters[1:5])) probs

Re: [R] Sampling from a Matrix

2006-08-04 Thread Marc Schwartz (via MN)
On Fri, 2006-08-04 at 12:46 -0400, Daniel Gerlanc wrote: Hello all, Consider the following problem: There is a matrix of probabilities: set.seed(1) probs - array(abs(rnorm(25, sd = 0.33)), dim = c(5,5), dimnames = list(1:5, letters[1:5])) probs a b c d