I _guess_ it is a zero-based indexing error. igraph vertices and edges
are indexed from zero in the 0.5.x version and R vectors are indexed
from 1, and this might cause the difference. But hard to say.

G.

On Mon, Apr 9, 2012 at 2:47 PM, Peter Flom
<[email protected]> wrote:
> Hi again
>
> I tried to make up a toy example, but 30 minutes of trying failed to
> reproduce anything useful
>
> However, in this code:
>
>> Code:
>> vs <- subcomponent1
>> component <- subgraph(g50, vs)
>> traitscomponent <- subset(traits50, traits$Position %in% vs)
>>
>> After which traitscomponent has 37879 rows while vs has length 37880.
>
> Subcomponent1 is the first column of a subcomponent of g50.  It is a vector
> of 37880 integers
> g50 is a graph with 42,943 rows. The vertices have attributes including
> "position" as the first.
> Traits50 is a data frame with 42,943 rows and 10 columns. The first column
> is "Position".
>
> Does that provide enough context?
>
> Peter
>
>
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help



-- 
Gabor Csardi <[email protected]>     MTA KFKI RMKI

_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to