igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] attribute problem with graph.data.frame


From: Gábor Csárdi
Subject: Re: [igraph] attribute problem with graph.data.frame
Date: Tue, 13 Apr 2010 10:19:20 +0200

Yannick,

M <- rbind( c("ff8aa9e5295d5fbeb391e70865f888ba",
"7ddc60ba3dea9813aec037279dd81c5d ", "2010-02-19 14:40:29"),
c("b880733653704653d2a8329bb9507447",
"5cb1a800193e064ba95536d6a5018b91", "2010-02-19 14:40:35"),
c("1bace89087a54bb01a093621fc374026",
"d1c16d22f59bfec0951d13692dc4c77e", "2010-02-19 14:40:36"),
c("c8873ed38a44311388e6870a4dfd55d6",
"eb212222de32bfc2d2d51f01f2b20848", "2010-02-19 14:40:43") )

graph.data.frame(data.frame(M))

works fine for me, so Tamas is right I think. If you still have
problems please send the output of sapply(swap, class).

Best,
Gabor

On Tue, Apr 13, 2010 at 1:23 AM, Yannick Rochat
<address@hidden> wrote:
> Dear all,
>
> I've got a 3 columns data frame appearing like this :
>
>> swap[1:4,]
>                                  V3
> V4                   V5
> 1  ff8aa9e5295d5fbeb391e70865f888ba  7ddc60ba3dea9813aec037279dd81c5d
> 2010-02-19 14:40:29
> 2  b880733653704653d2a8329bb9507447  5cb1a800193e064ba95536d6a5018b91
> 2010-02-19 14:40:35
> 3  1bace89087a54bb01a093621fc374026  d1c16d22f59bfec0951d13692dc4c77e
> 2010-02-19 14:40:36
> 4  c8873ed38a44311388e6870a4dfd55d6  eb212222de32bfc2d2d51f01f2b20848
> 2010-02-19 14:40:43
>
> with V3 source nodes, V4 target nodes and V5 a time stamp I need as an
> attribute. When importing it to create a graph I get this message error :
>
>> graph.data.frame(as.matrix(swap),directed=TRUE) -> g1.sw
>
> Erreur dans attrs[[names(d)[i]]] <- newval :
>   tentative de sélectionner moins d'un élément
>
> (transl. "you tried to select less than one element").
>
> Could you please help me and tell me what I'm doing wrong ?
>
>
> Thank you very much !
>
>
>
> Yannick
>
>
>
> ---------------------------------------------------------------
> Yannick Rochat - IMA - Université de Lausanne
> http://www.unil.ch/unisciences/YannickRochat
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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