How can I extract a list of the positions in the matrix?
> A=matrix(1:8, nrow=2,ncol=4)
> A
     [,1] [,2] [,3] [,4]
[1,]    1    3    5    7
[2,]    2    4    6    8


Something like this

pos.A

1 1
1 2
1 3
1 4
2 1
2 2
2 3
2 4

______________________________________________
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