igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Largest connected component extraction


From: Gábor Csárdi
Subject: Re: [igraph] Largest connected component extraction
Date: Wed, 14 Dec 2011 10:49:38 -0500

Please see
https://lists.nongnu.org/archive/html/igraph-help/2009-08/msg00064.html

This works for igraph 0.5.x

G.

On Wed, Dec 14, 2011 at 10:21 AM, Minsu Park <address@hidden> wrote:
> Hi all,
> I'm trying to calculate basic network properties such as mean in/outdegree,
> density, diameter, and transitivity in R.
> But I couldn't extract a largest component graph. I pasted my code as shown
> below.
>
>
>     edge_list = read.table(x)
>     edge_list = data.frame(edge_list)
>     network = graph.data.frame(edge_list, directed=T)
>     gclust = clusters(network)
>     numClust = gclust$no # number of connected component
>     numLCC = gclust$csize[1] # number of nodes in LCC
> #   lcc = gclust$membership[1]
>     lcc = induced.subgraph(g, V(g)[which(gclust$membership ==
> which.max(gclust$csize))])
>
>
> Last two lines are the function which I used for largest connected
> component. But those which I used didn't work.
> The error I've got is "Error: could not find function "induced.subgraph."
>
> Please help me out for solving the problem!
>
>
>
> Minsu
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

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