Daniel Stefan Hain
2013-Jun-28 14:50 UTC
[R] Vertex names by creating a network object via an edgelist [package: network]
Dear R community, I have the following problem, and kindly ask for some support. I want to create a network object, representing a directed network on basis of an edgelist. The first column contains some unique ID of project leaders, the second project partners, let's say: x <- cbind(rbind(1,1,2,2,3), rbind(3,7,10,9,6)) y.nw <- network(x, matrix="edgelist", directed=TRUE, loops=FALSE) Now my problem is: I need all vertexes to have the right ID, since after creating the network object I have to transfer it back to a adjacency matrix with the right corresponding firm IDs. However, I am not sure in which order I should assign them, since I sorted the dataframe by column 1 (project leaders), which, however, not always show up as project partners as well. Anybody around that can help me with that? Thousand thanks in advance Daniel S. Hain Ph.D. Fellow, M.Sc. Economics, Dipl.-Wirt.-Ing. Department of Business and Management | IKE | DRUID | EIS T: (+45) 9940 2724 | Email: dsh@busines.aau.dk<mailto:dsh@busines.aau.dk> Web: www.ike.aau.dk<http://www.ike.aau.dk/> | www.eis-all.dk<http://www.eis-all.dk/> | www.innoresource.org<http://www.innoresource.org/> Aalborg University | Fibigerstræde 11, Room 91 | DK-9220 Aalborg, Denmark [[alternative HTML version deleted]]