gene <[EMAIL PROTECTED]> writes:
> Apologies for the rather newbie question, but I haven't been able to
> figure this out.
> I've got a 3d matrix (though presumably, the answer would be the same
> as for a 2d matrix) which I want to multiply by the values in a vector
> like so:
>
> matrix m is:
>
Apologies for the rather newbie question, but I haven't been able to
figure this out.
I've got a 3d matrix (though presumably, the answer would be the same
as for a 2d matrix) which I want to multiply by the values in a vector
like so:
matrix m is:
, , 1
[,1] [,2]
[1,]16
[2,]2
t: 05 August 2003 17:43
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [R] 3D matrix
Dear all,
Thanks for all the answers.
I think I need to explain what I want to do.
I want to create 100 matrices with size 12x12.
The following program is not working...
nk <- 100
for (i in 1:nk) {
case[
Dear all,
Thanks for all the answers.
I think I need to explain what I want to do.
I want to create 100 matrices with size 12x12.
The following program is not working...
nk <- 100
for (i in 1:nk) {
case[i]<-matrix(0,12,12)
}
Thanks a lot.
Regards.
Marcel
From: Prof Brian Ripley <[EMAIL PROTECTE
Do you mean a 3-dimensional array? If so see the help for array().
In S/R terminology, a matrix is 2D, by definition.
On Tue, 5 Aug 2003, Marcel Vieira wrote:
> Is it possible to define a 3 dimension matrix in R?
> (without using list - if possible)
--
Brian D. Ripley, [EMAIL
Try ?array
eg array(1:8,c(2,2,2))
> -Original Message-
> From: Marcel Vieira [mailto:[EMAIL PROTECTED]
> Sent: 05 August 2003 17:11
> To: [EMAIL PROTECTED]
> Subject: [R] 3D matrix
>
>
> Dear all,
>
> Is it possible to define a 3 dimension matrix in
Dear all,
Is it possible to define a 3 dimension matrix in R?
(without using list - if possible)
Many thanks in advance.
Marcel
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help