# make_tree: Create tree graphs In igraph: Network Analysis and Visualization

## Description

Create a regular tree graph.

## Usage

 ```1 2 3``` ```make_tree(n, children = 2, mode = c("out", "in", "undirected")) tree(...) ```

## Arguments

 `n` Number of vertices. `children` Integer scalar, the number of children of a vertex (except for leafs) `mode` 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`.

## Value

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`

## Examples

 ```1 2``` ```make_tree(10, 2) make_tree(10, 3, mode = "undirected") ```

### Example output

```Attaching package: 'igraph'

The following objects are masked from 'package:stats':

decompose, spectrum

The following object is masked from 'package:base':

union

IGRAPH 0b00000 D--- 10 9 -- Tree
+ attr: name (g/c), children (g/n), mode (g/c)
+ edges from 0b00000:
[1] 1-> 2 1-> 3 2-> 4 2-> 5 3-> 6 3-> 7 4-> 8 4-> 9 5->10
IGRAPH 0b00000 U--- 10 9 -- Tree
+ attr: name (g/c), children (g/n), mode (g/c)
+ edges from 0b00000:
[1] 1-- 2 1-- 3 1-- 4 2-- 5 2-- 6 2-- 7 3-- 8 3-- 9 3--10
```

igraph documentation built on March 18, 2018, 1:24 p.m.