[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] as.undirected() strips vertex attributes?
From: |
uxzmdlj02 |
Subject: |
Re: [igraph] as.undirected() strips vertex attributes? |
Date: |
Fri, 21 Sep 2007 19:39:23 -0500 |
Ok, thanks for the response.
By the way, any idea of timeframe for the 0.5 release? I have some R
code for cohesive blocking (as in Moody, While 2003) that I was
planning to hand over to the project, and maybe before a point
release would be the best time...
Oh, and in case anybody else uses it, my function from the last email
should be:
as.undirected2 <- function(g){
## store the attributes:
tempAtt <- list()
for(a in list.vertex.attributes(g)){
tempAtt <- c(tempAtt,list(get.vertex.attribute(g,a)))
names(tempAtt)[length(tempAtt)] <- a
}
## convert the graph:
res <- as.undirected(g)
## restore the attributes:
for(a in names(tempAtt)){
set.vertex.attribute(res,a,value=tempAtt[[a]])
}
return(res)
}
On Sep 21, 2007, at 3:00 PM, Tamas Nepusz ntamas-at-rmki.kfki.hu |
igraph-help| wrote:
It looks like as.undirected() strips vertex attributes in igraph
0.4.3. Is this a bug?
Yes, unfortunately that's a bug - thanks for reporting it. It will be
fixed in igraph 0.5 (I already added an entry in our issue tracker).
The workaround you implemented seems okay to me, but since the cause
of this issue is in the low-level C layer of the library, it will be
fixed there (so we don't have to work out a workaround for every
single higher level interface).
--
Tamas
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help
- [igraph] key players in networks, Simone Gabbriellini, 2007/09/11
- Re: [igraph] key players in networks, Gabor Csardi, 2007/09/13
- Re: [igraph] key players in networks, Gabor Csardi, 2007/09/13
- Re: [igraph] key players in networks, Simone Gabbriellini, 2007/09/16
- Re: [igraph] key players in networks, Simone Gabbriellini, 2007/09/19
- Re: [igraph] key players in networks, Tamas Nepusz, 2007/09/19
- Re: [igraph] key players in networks, Gabor Csardi, 2007/09/20
- [igraph] as.undirected() strips vertex attributes?, uxzmdlj02, 2007/09/21
- Re: [igraph] as.undirected() strips vertex attributes?, Tamas Nepusz, 2007/09/21
- Re: [igraph] as.undirected() strips vertex attributes?,
uxzmdlj02 <=
- Re: [igraph] as.undirected() strips vertex attributes?, Gabor Csardi, 2007/09/24
- Re: [igraph] as.undirected() strips vertex attributes?, Tamas Nepusz, 2007/09/24