Jonathan Rougier (J.C.Rougier@durham.ac.uk)
Tue, 21 Dec 1999 14:54:07 +0000 (GMT)
On Tue, 21 Dec 1999, Prof Brian Ripley wrote:
> I am a bit puzzled here. Why is that n=5 not n=4? Anyway, try
>
> A <- matrix(1, n-1, n-1)
> rA <- row(A)
> rA[rA + col(A) <= n]
Or, in the festive spirit,
n <- 5
rA <- outer(1:n, 1:n, "-")
rA[rA>=1]
Cheers, Jonathan.
Jonathan Rougier Science Laboratories
Department of Mathematical Sciences South Road
University of Durham Durham DH1 3LE
"[B]egin upon the precept ... that the things we see are to be
weighed in the scale with what we know" (Meredith, 1879, The Egoist)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2.0b3 on Tue 04 Jan 2000 - 13:34:03 EST