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 = 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