You can try obtaining an edgelist (as_edgelist) and then creating a graph with attributes with the function: graph_from_data_frame. I guess there is a more direct way...
Sebastián Goinheix El dom., 3 nov. 2019 a las 22:54, Sergei Kostiaev (< [email protected]>) escribió: > hello, > > how to create igraph bipartite network that has vertex attribute? > i use this code > > links <- coalitions_data_2019_11_03 > > head(links) > > library(igraph) > > coal <- graph_from_data_frame(d=links, directed=FALSE) > > V(coal)$type <- bipartite.mapping(coal)$type > > to create bipartite network in igraph from the dataset attached > i need to set an attribute (supports variable) to vertex (organization > variable) > i don't know how > > -- > Best regards, > > Dr. Sergei Kostiaev > > PhD Candidate > Edward J. Bloustein School of Planning and Public Policy; > Part-Time Lecturer > Political Science Department > Rutgers University; > http://bloustein.rutgers.edu/kostiaev/ > U.S. cell +1(202)361-7672 > > Adjunct Senior Fellow > Institute of Scientific Information on Social Sciences > Russian Academy of Sciences > Russian cell +7(495)798-2575 > > > > > > > > > > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help >
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
