From: <stefan.petersson_at_inizio.se>

Date: Wed, 11 Jun 2008 10:10:55 +0200

R-help_at_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. Received on Wed 11 Jun 2008 - 11:18:22 GMT

Date: Wed, 11 Jun 2008 10:10:55 +0200

ng,

x <- matrix(c(1,0,0, 0,0,1, 0,1,0, 0,0,1, 0,1,0, 1,0,0),ncol=3,byrow=T) x

[,1] [,2] [,3]

[1,] 1 0 0

*[2,] 0 0 1
**[3,] 0 1 0
**[4,] 0 0 1
**[5,] 0 1 0
**[6,] 1 0 0
*

In the matrix above, on the first row, the 1 is in column 1, hence '1' on the first row in the matrix below. On the second row in the matrix above, the 1 is in column 3, hence the '3' on the second row in the matrix below. And so on...

y

[,1]

*[1,] 1
**[2,] 3
**[3,] 2
**[4,] 3
*

[5,] 2

[6,] 1

R-help_at_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. Received on Wed 11 Jun 2008 - 11:18:22 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Wed 11 Jun 2008 - 15:30:40 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*