[R] RE : for loops

2007-04-25 Thread justin bem
You can see with this simple example. matrix.t.test-function(mx){ p-dim(mx)[2] #number of column in the matrix n-dim(mx)[1] #number of row n.tests- p*(p-1)/2 #Number of tests to be done tested.var -rep(,n.tests) #Keep rang of tested column r.t.stat-rep(0, n.tests)#contain t.stat r.p.val

Re: [R] RE : for loops

2007-04-25 Thread Petr Klasterecky
I know that a looping solution was requested, but this is exactly what apply() should be used for... Petr justin bem napsal(a): You can see with this simple example. matrix.t.test-function(mx){ p-dim(mx)[2] #number of column in the matrix n-dim(mx)[1] #number of row n.tests-