Re: [R] how to evaluate a dynamic variable?

2007-04-27 Thread Finny Kuruvilla
gt; > Can someone teach me how to do this? Thanks very much. > > - Bobby > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.h

Re: [R] Randomising matrices

2007-04-27 Thread Finny Kuruvilla
really not sure that they are implemented in R. Sincerely, Finny Kuruvilla wrote: Hi Nick, This way isn't the most elegant but works well, especially if the matrices aren't too large: # This function works on 2x2 arrays, randomizing them, but # preserving row and column tota

Re: [R] Randomising matrices

2007-04-27 Thread Finny Kuruvilla
ple: > a=array(sample(c(0,1),10,replace=TRUE),dim=c(5,2)) > a [,1] [,2] [1,]01 [2,]11 [3,]01 [4,]01 [5,]10 > shuffle_matrix(a) [,1] [,2] [1,]01 [2,]11 [3,]10 [4,] 0 1 [5,]

Re: [R] comparing two matrices, row by row

2007-04-26 Thread Finny Kuruvilla
Another similar way to do this using apply is: apply(ar1==ar2,1,all) Best, Finny Kuruvilla * Finny Kuruvilla, MD, PhD Harvard Medical School Fellowship Program in Transfusion Medicine Broad Institute of MIT and Harvard Homepage

[R] mclust priors

2006-12-20 Thread Finny Kuruvilla
be a priori? Thanks, Finny Kuruvilla * Finny Kuruvilla, MD, PhD Harvard Medical School Fellowship Program in Transfusion Medicine Broad Institute of MIT and Harvard Homepage: http://www.people.fas.harvard.edu/~kuruvill