Print

Print


Hi David

It’s been a while since I used igraph, but what I recall doing is putting the data frame with all information together first, and then turning it into an igraph with graph_from_data_frame()  
(You can make your graph object a data frame again with as_data_frame() ).

But in my case I had a “to” and “from” column for all nodes (so if a node had more than 1 vertex/alter, it appears more than once in the list), so that might not be the same as in your situation. And I only had 1 (numerical) attributes.
I found this websites very useful when working with igraph:
http://kateto.net/network-visualization

I made circular networks and ‘bipartite’ graphs at the time. I think I might be able to find the code I used, if you think it might be useful (and can meet, if you prefer). 

Kind regards

Geraldine Klarenberg, PhD
Post-Doctoral Associate
Department of Wildlife Ecology and Conservation / Agricultural and Biological Engineering
University of Florida
Tel: 352-294-7581
Cell: 386-517-3952
Email: [log in to unmask]




On Jul 28, 2018, at 10:32 PM, Canarte Gutierrez,Climaco D <[log in to unmask]> wrote:

Hello Community

I am having some issues with data management of a social network analysis project (ego-centric networks).

I have three different csv files 1) One csv file with data of 119 egos, 2) One csv file with all ego’s alter attributes (30 alters per ego), 3) 119 cvs files with alter-alter ties as adjacency matrices. The last two have been turn into lists.

The problems appear when I want to merge the list of alter-alter ties to the list of alter attributes as one single Igraph object. One of the error messages I am often having is "Error in as.data.frame.default(d) : cannot coerce class ‘"igraph"’ to a data.frame”

I apologize for not including more chunks of coding on this email to help you understand, but I didn’t want to overwhelm my explanation. I’d appreciate very much if anyone who’s available on campus during summer B could take a look at my project and give me hand. I can agree on an appointment.  

Best,

David Cañarte
Ph.D. Student
Department of Sociology and Criminology
University of Florida
[log in to unmask]

This list strives to be beginner friendly.  However, we still ask that you
PLEASE do read the posting guide https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html&d=DwIDaQ&c=pZJPUDQ3SB9JplYbifm4nt2lEVG5pWx2KikqINpWlZM&r=MXGJLZdg_Xr4ILALJS46PrZXmoe_LvK8fajdrl4cyCc&m=gHw53-kwa6Y3BfPK9pXQXbfGgBY3zwfwArd_Flsvxdc&s=IRjcEgP76c62ii5UG_yl8rk6A18NqUJX1KGdaWXaUr8&e=
and provide commented, minimal, self-contained, reproducible code.

This list strives to be beginner friendly. However, we still ask that you PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.