[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] starting with igraph

From: Gábor Csárdi
Subject: Re: [igraph] starting with igraph
Date: Tue, 16 Nov 2010 18:32:39 +0100

Hi Julie,

graph.data.frame() does not use this format, please read its manual
page about the format it expects. There is also an example in the
manual page. You will need to convert your data to this format to
create an igraph graph from it.

Best Regards,

PS. please consider subscribing the mailing list otherwise you might
miss some of the answers to your questions. Thanks.

On Tue, Nov 16, 2010 at 2:59 PM, Julie VERCELLONI
<address@hidden> wrote:
> 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 =
> 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
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help

Gabor Csardi <address@hidden>     UNIL DGM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]