|
From: | Julie VERCELLONI |
Subject: | [igraph] starting with igraph |
Date: | Tue, 16 Nov 2010 14:59:13 +0100 |
Hi, I am a new user in the giant world of social network analysis. I would like to compute an analysis which conduct a community division with Newman modularity with “label.propagation.community” command. For this kind of analysis, we must have an igraph object. Here is my problem. I did not find any example which creates an igraph object with the same structure of my data. My data are composed to two columns (I attached an example): - first column represent names of individuals encountered - second column represent groups in which individuals belong to during a sampling event (i.e. days) My aims are to build a weighted network with edges weighted by association indices (simple ratio index ranging fom 0 to 1) calculated by the data above and resulting in a matrix of associations between individuals. My preliminary analysis were conducted with the program Socprog (Whitehead 2009) where I was able to build a weighted network of association between individuals and to divide the network into communities with Newman’s modularity (Newman 2006). As I would like to adapt analysis from this preliminary analysis, I am coming through R to compute network analysis. I have tried to build an igraph object with graph.data.frame command. At the start, I knewn the number of edges so, I have written: v <-read.table("d:\\Modele\\R\\essai2.txt",header=T,stringsAsFactors = FALSE) g <- graph.data.frame(v, directed=F,vertices=NULL) I have obtained an igraph object with the good number of edges but not the good number of vertices. When I have made V(g)$name I have a vector with names of individuals (that is ok) and after the number of groups (that is not vertices). So, I don’t know what command and what kind of data (this data or associate matrix) I need to start for my analysis. Are they any specific documentation / scripts /explanation that could help me ? Many thanks for any advice Regards Julie |
[Prev in Thread] | Current Thread | [Next in Thread] |