|
From: | Chris Watson |
Subject: | Re: [igraph] Delete all attributes |
Date: | Sat, 22 Aug 2015 13:01:51 -0400 |
Hi Chris,
Yes, that's the way to do it - we have no dedicated function for this.
However, you can also create a new graph from the edge list of the old
graph, which is effectively the same thing (I guess), and it is
probably faster.
T.
T.
> _______________________________________________
On Thu, Aug 20, 2015 at 9:09 AM, Chris Watson <address@hidden> wrote:
> Is there a function to delete *all* attributes of a graph (graph, vertex,
> and edge level)? If not, is the way to do it, e.g.
>
> delete_all_attr <- function(g) {
> for (att in graph_attr_names(g)) g <- delete_graph_attr(g, att)
> for (att in vertex_attr_names(g)) g <- delete_vertex_attr(g, att)
> for (att in edge_attr_names(g)) g <- delete_edge_attr(g, att)
> return(g)
> }
>
> Thanks,
> Chris
>
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
[Prev in Thread] | Current Thread | [Next in Thread] |