Hi,

I have noticed the following:

> a <- array(1:4, c(2, 2))
> A <- array(1:4, c(2,2,2))
> A + a
Error in A + a : non-conformable arrays

It works with a matrix + a vector, why doesn't it work with arrays?
Am I missing something?

How would you do the above operation efficiently (ie I need to add a
matrix to each "plane" of 3-dim array)?  At the moment I am using
something like

A + array(a, c(2,2,2))

but it doesn't seem that efficient.

Thanks

Tamas

-- 
Tamás K. Papp
E-mail: [EMAIL PROTECTED] (preferred, especially for large messages)
        [EMAIL PROTECTED]
Please try to send only (latin-2) plain text, not HTML or other garbage.

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to