igraph-help
[Top][All Lists]
Advanced

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

[igraph] add vertex attributes from a data.frame


From: Simone Gabbriellini
Subject: [igraph] add vertex attributes from a data.frame
Date: Thu, 24 Mar 2011 20:50:00 +0100

Hello List,

i am trying to add a vertex attribute from a data.frame like:

> 
who_invited_whom

    invited inviter
1   user139  user83
2   user140  user83
3   user141  user83
4   user142  user83
5   user143  user83
6   user144  user83

I would like to add an attribute "invitedby" to vertex of type==0. I am trying 
this:

V(g)[type==0 & name %in% 
who_invited_whom$invited]$invitedby<-who_invited_whom$inviter

Warning message:
In graph[[9]][[3]][[name]][index] <- value :
  il numero di elementi da sostituire non `e un multiplo della lunghezza di 
sostituzione

Why am I getting the warning? Am I doing something wrong here?

thanks for your help!

best regards,
Simone


reply via email to

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