
Last chance! 50% off unlimited learning
Sale ends in
Create a regular tree graph.
make_tree(n, children = 2, mode = c("out", "in", "undirected"))tree(...)
Number of vertices.
Integer scalar, the number of children of a vertex (except for leafs)
Defines the direction of the
edges. out
indicates that the edges point from the parent to
the children, in
indicates that they point from the children
to their parents, while undirected
creates an undirected
graph.
Passed to make_tree
.
An igraph graph
Other determimistic constructors:
graph_from_atlas()
,
graph_from_edgelist()
,
graph_from_literal()
,
make_chordal_ring()
,
make_empty_graph()
,
make_full_citation_graph()
,
make_full_graph()
,
make_graph()
,
make_lattice()
,
make_ring()
,
make_star()
# NOT RUN {
make_tree(10, 2)
make_tree(10, 3, mode = "undirected")
# }
Run the code above in your browser using DataLab