Hi Ana,
most probably this is one of the more ugly solutions:
> d=dim(A)
> d
[1] 2 4
> cbind(rep(1:d[1], each=d[2]), rep(1:d[2], d[1]))
[,1] [,2]
[1,]11
[2,]12
[3,]13
[4,]14
[5,]21
[6,]22
[7,]23
[8,]24
Thanks,
wr
* Ana [2012
Hi Ana,
> d=dim(A)
> d
[1] 2 4
> cbind(rep(1:d[1], each=d[2]), rep(1:d[2], d[1]))
[,1] [,2]
[1,]11
[2,]12
[3,]13
[4,]14
[5,]21
[6,]22
[7,]23
[8,]24
Thanks,
wr
* Ana [2012-01-01 23:21:12 +0100]:
> How can I extract a list of
Hi Ana,
most probably this is one of the more ugly solutions:
> d=dim(A)
> d
[1] 2 4
> cbind(rep(1:d[1], each=d[2]), rep(1:d[2], d[1]))
[,1] [,2]
[1,]11
[2,]12
[3,]13
[4,]14
[5,]21
[6,]22
[7,]23
[8,]24
Thanks,
wr
* Ana [2012-
Here's one way:
> data.frame(rowID=as.vector(row(A)), colID=as.vector(col(A)), A=as.vector(A))
rowID colID A
1 1 1 1
2 2 1 2
3 1 2 3
4 2 2 4
5 1 3 5
6 2 3 6
7 1 4 7
8 2 4 8
You can sort that as desired.
Sarah
On Sun, Jan 1, 2012 a
4 matches
Mail list logo