Hi Simone, > redund<-Reduce(union, list(unei,wnei)) > redund<-Reduce(setdiff, list(redund,i)) First, you need "intersect" here, not "union". Second, just out of curiosity, why don't you simply do this:
redund <- setdiff(intersect(unei, wnei), i) Also, a possible bug: if(length(nei)>0) should be replaced by if(length(nei)>1), since there are no "neighbor pairs" if the node has only one neighbor. -- T. _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
