Re: [R] sort adjacency matrix

2015-04-06 Thread Rui Barradas
Hello, You should have used ?dput to post your data example. Since you haven't, I've made up one. set.seed(4795) mat - matrix(sample(0:1, 24, replace = TRUE), nrow = 6) mat inx - order(rowSums(mat), decreasing = TRUE) mat[inx, ] Hope this helps, Rui Barradas Em 06-04-2015 18:18, Ragia

[R] sort adjacency matrix

2015-04-06 Thread Ragia Ibrahim
Dear group i have the following matrix 1 . . 1 . . 1 . . . . 2 . . . . . . 1 . . . 3 1 . . . 1 . . 1 . 1 4 . . . . . 1 . . . . 5 . . 1 . . . . . . 1 6 1 . . 1 . . . . 1 . 7 . 1 . . . . . 1 . . 8 . . 1 . . . 1 . . 1 9 . . . . . 1 . . . 1 10 . . 1 . 1 . . 1 1 . I want to sort it

Re: [R] sort adjacency matrix

2015-04-06 Thread David L Carlson
University College Station, TX 77840-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ragia Ibrahim Sent: Monday, April 6, 2015 12:18 PM To: r-help@r-project.org Subject: [R] sort adjacency matrix Dear group i have the following matrix 1 . . 1

Re: [R] sort adjacency matrix

2015-04-06 Thread Bert Gunter
[mailto:r-help-boun...@r-project.org] On Behalf Of Ragia Ibrahim Sent: Monday, April 6, 2015 12:18 PM To: r-help@r-project.org Subject: [R] sort adjacency matrix Dear group i have the following matrix 1 . . 1 . . 1 . . . . 2 . . . . . . 1 . . . 3 1 . . . 1 . . 1 . 1 4 . . . . . 1

Re: [R] sort adjacency matrix

2015-04-06 Thread David Winsemius
of Anthropology Texas AM University College Station, TX 77840-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ragia Ibrahim Sent: Monday, April 6, 2015 12:18 PM To: r-help@r-project.org Subject: [R] sort adjacency matrix Dear group i have