Hi Alwx99,
Nobody has answered your email, so, I am left with the honour of
disappointing you.
In R, matrices are not dynamically allocated. If you are a C/C++/Fortran/etc
programmer you know what I am talking about.
Lets assume that you are not such programmer. Inserting a row would tell R
to
What is 'insertRow'? Is it returning a value? It must be since you
can not change the value of parameters. Maybe you need:
Ave <- insertRow(Avg,i,colMeans(res))
On Tue, Oct 21, 2008 at 2:19 PM, Alex99 <[EMAIL PROTECTED]> wrote:
>
> Hi guys,
>
> I need to insert a row to a matrix in a for loop.
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:
3 matches
Mail list logo