Skip to contents

Delete a vertex attribute

Usage

delete_vertex_attr(graph, name)

Arguments

graph

The graph

name

The name of the vertex attribute to delete.

Value

The graph, with the specified vertex attribute removed.

Examples

g <- make_ring(10) %>%
  set_vertex_attr("name", value = LETTERS[1:10])
vertex_attr_names(g)
#> [1] "name"
g2 <- delete_vertex_attr(g, "name")
vertex_attr_names(g2)
#> character(0)