跳到内容

构造函数修饰符,用于添加边属性

用法

with_edge_(...)

参数

...

要添加的属性。它们必须被命名。

参见

构造函数修饰符(及相关函数)make_(), sample_(), simplified(), with_graph_(), with_vertex_(), without_attr(), without_loops(), without_multiples()

示例

make_(
  ring(10),
  with_edge_(
    color = "red",
    weight = rep(1:2, 5)
  )
) %>%
  plot()