[Top][All Lists]

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

[igraph] Largest connected component extraction

From: Minsu Park
Subject: [igraph] Largest connected component extraction
Date: Thu, 15 Dec 2011 00:21:06 +0900

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!


reply via email to

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