# makeDendrite: Build a list of the mutually exclusive attributes of objects In plotrix: Various Plotting Functions

## Description

Build a list of mutually exclusive attributes from a matrix of category indicators.

## Usage

 `1` ``` makeDendrite(x) ```

## Arguments

 `x` A data frame or matrix where rows represent objects and columns mutually exclusive attributes of a given class.

## Details

The values in x indicate which attribute of a particular class is possessed by the object. For instance, the attributes dead and alive are mutually exclusive. makeDendrite creates a nested list that contains the counts of successive combinations of the attributes. The top level attributes are taken from the first column, then those are combined with the attributes in the second column and so on.

## Value

A list of the counts of objects for each combination of the attribute classes.

Jim Lemon

plot.dendrite

## Examples

 ```1 2 3 4 5 6``` ``` sex<-sample(c("M","F"),100,TRUE) hair<-sample(c("Blond","Black","Brown","Red"),100,TRUE) eye<-sample(c("Blue","Black","Brown","Green"),100,TRUE) charac<-data.frame(sex=sex,hair=hair,eye=eye) characlist<-makeDendrite(charac) characlist ```

### Example output

```[[1]]
[[1]][[1]]
F
53

[[1]][[2]]
[[1]]
[[1]][[1]]
Black
15

[[1]][[2]]
[[1]]
[[1]][[1]]
Black
5

[[1]][[2]]
NULL

[[2]]
[[2]][[1]]
Blue
3

[[2]][[2]]
NULL

[[3]]
[[3]][[1]]
Brown
5

[[3]][[2]]
NULL

[[4]]
[[4]][[1]]
Green
2

[[4]][[2]]
NULL

attr(,"class")
[1] "dendrite"

[[2]]
[[2]][[1]]
Blond
12

[[2]][[2]]
[[1]]
[[1]][[1]]
Black
1

[[1]][[2]]
NULL

[[2]]
[[2]][[1]]
Blue
6

[[2]][[2]]
NULL

[[3]]
[[3]][[1]]
Brown
1

[[3]][[2]]
NULL

[[4]]
[[4]][[1]]
Green
4

[[4]][[2]]
NULL

attr(,"class")
[1] "dendrite"

[[3]]
[[3]][[1]]
Brown
12

[[3]][[2]]
[[1]]
[[1]][[1]]
Black
2

[[1]][[2]]
NULL

[[2]]
[[2]][[1]]
Blue
4

[[2]][[2]]
NULL

[[3]]
[[3]][[1]]
Brown
3

[[3]][[2]]
NULL

[[4]]
[[4]][[1]]
Green
3

[[4]][[2]]
NULL

attr(,"class")
[1] "dendrite"

[[4]]
[[4]][[1]]
Red
14

[[4]][[2]]
[[1]]
[[1]][[1]]
Black
4

[[1]][[2]]
NULL

[[2]]
[[2]][[1]]
Blue
3

[[2]][[2]]
NULL

[[3]]
[[3]][[1]]
Brown
3

[[3]][[2]]
NULL

[[4]]
[[4]][[1]]
Green
4

[[4]][[2]]
NULL

attr(,"class")
[1] "dendrite"

attr(,"class")
[1] "dendrite"

[[2]]
[[2]][[1]]
M
47

[[2]][[2]]
[[1]]
[[1]][[1]]
Black
12

[[1]][[2]]
[[1]]
[[1]][[1]]
Black
4

[[1]][[2]]
NULL

[[2]]
[[2]][[1]]
Blue
2

[[2]][[2]]
NULL

[[3]]
[[3]][[1]]
Brown
3

[[3]][[2]]
NULL

[[4]]
[[4]][[1]]
Green
3

[[4]][[2]]
NULL

attr(,"class")
[1] "dendrite"

[[2]]
[[2]][[1]]
Blond
14

[[2]][[2]]
[[1]]
[[1]][[1]]
Black
4

[[1]][[2]]
NULL

[[2]]
[[2]][[1]]
Blue
2

[[2]][[2]]
NULL

[[3]]
[[3]][[1]]
Brown
6

[[3]][[2]]
NULL

[[4]]
[[4]][[1]]
Green
2

[[4]][[2]]
NULL

attr(,"class")
[1] "dendrite"

[[3]]
[[3]][[1]]
Brown
7

[[3]][[2]]
[[1]]
[[1]][[1]]
Black
1

[[1]][[2]]
NULL

[[2]]
[[2]][[1]]
Blue
3

[[2]][[2]]
NULL

[[3]]
[[3]][[1]]
Green
3

[[3]][[2]]
NULL

attr(,"class")
[1] "dendrite"

[[4]]
[[4]][[1]]
Red
14

[[4]][[2]]
[[1]]
[[1]][[1]]
Black
4

[[1]][[2]]
NULL

[[2]]
[[2]][[1]]
Blue
4

[[2]][[2]]
NULL

[[3]]
[[3]][[1]]
Brown
2

[[3]][[2]]
NULL

[[4]]
[[4]][[1]]
Green
4

[[4]][[2]]
NULL

attr(,"class")
[1] "dendrite"

attr(,"class")
[1] "dendrite"

attr(,"class")
[1] "dendrite"
```

plotrix documentation built on May 27, 2018, 5:04 p.m.