igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] getting the graph of the maximum component


From: Gábor Csárdi
Subject: Re: [igraph] getting the graph of the maximum component
Date: Mon, 9 Aug 2010 10:47:37 +0200

On Mon, Aug 9, 2010 at 10:39 AM, Martin Tomko <address@hidden> wrote:
> Excellent, thanks.
>
> I am running into a weird behaviour using the approach you mentioned for the
> identification of the max component. When I modified my code on my local
> machine ("R version 2.9.0 (2009-04-17)")
>  if(is.connected(g)==FALSE) g <- subgraph(g,
> which(c$membership==which.max(c$csize)-1)-1);
> this works perfectly, with igraph:
> packageDescription(pkg="igraph")$Version
> [1] "0.5.2-2"
>
> When run on the server, where I have ("R version 2.10.0 (2009-10-26)"), the
> same command on the same network results into an error:
>
> "H:/Res/inputs/eis.net"
> Fehler in c$membership : $ operator is invalid for atomic vectors

This means that 'c' is not a list. Maybe you didn't calculate the
components at all with

c <- clusters(g)

and then with 'c' you refer to the c() R function. '$' is invalid for
that, indeed.

[...]

-- 
Gabor Csardi <address@hidden>     UNIL DGM



reply via email to

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