Thanks. My use case would be after using "rewire" to create a random graph.
I work w/ pretty small graphs so it only takes a couple milliseconds to
delete them all.

On Fri, Aug 21, 2015 at 3:47 PM, Tamas Nepusz <[email protected]> wrote:

> 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 <[email protected]> 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
> > [email protected]
> > https://lists.nongnu.org/mailman/listinfo/igraph-help
> >
>
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to