> Thanks Phipp very much for your help. I had meant, given that I'd
>  computed the matrix f[x,y] and the vector e[x], how to take the
>  difference. What is confusing is how to subtract a vector from a
>  matrix. I don't want the recycling rule.

That function sounds like its describing how to subtract the vector
from the matrix:

g[1, 1] = f[1, 1] - e[1] - e[1]
g[2, 3] = f[2, 3] - e[2] - e[3]

(which implies that f is square)

So maybe something like:

g <- f - outer(e, e, "-")

But a link to the paper and an example would be very helpful!

Hadley


-- 
http://had.co.nz/

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to