Displaying 1 result from an estimated 1 matches for "alwx99".
Did you mean:
alex99
2008 Oct 21
2
Inserting a new row in a matrix
Hi guys,
I need to insert a row to a matrix in a for loop. I have matrix named "Avg"
which is a 5x4 matrix of zeros.
I have a file named "A"(4 rows,14 columns) which I make a sample of it 5
times. each time I get the mean for each column and put the result in the
"Avg" matrix. this is my code:
Avg=matrix(0,5,4)
>
> for(i in 1:5){
+ res=(A[sample(nrow(A),