This function, `vegdist`

, calculates a distance matrix and does not perform PCA (?). Which did you want to perform?

It's possible to get this to run using the following:

```
vegdist(data.matrix(t(otus)), method="euclidean", na.rm=TRUE)
lass_Thermobacula Class_Anaerolineae Class_Chlorobia Class_Deinococci
Class_Anaerolineae 0.00003723909
Class_Chlorobia 0.00003748186 0.00002796176
Class_Deinococci 0.00003170000 0.00001954124 0.00002000000
unknown 0.00635252816 0.00637999757 0.00638193215 0.00638352917
```

*[your fifth bacterium had no column name, so I set it to 'unknown']*

*[your fourth bacterium had no data, so, it was removed by the addition of *na.rm=TRUE* to `vegdist`

]*

With the default Bray-Curtis method, it produces a warning:

```
vegdist(data.matrix(t(otus)), method="bray", na.rm=TRUE)
lass_Thermobacula Class_Anaerolineae Class_Chlorobia Class_Deinococci
Class_Anaerolineae 1.0000000
Class_Chlorobia 1.0000000 1.0000000
Class_Deinococci 1.0000000 1.0000000 1.0000000
unknown 0.9925103 0.9934758 0.9952681 1.0000000
Warning message:
In vegdist(data.matrix(t(otus)), method = "bray", na.rm = TRUE) :
you have empty rows: their dissimilarities may be meaningless in method “bray”
```

## -----------------------

You can also convert NAs to zeros, provide you understand exactly why values were assigned NA in the first place.

```
otus[is.na(otus)] <- 0
vegdist(data.matrix(t(otus)), method="euclidean", na.rm=TRUE)
lass_Thermobacula Class_Anaerolineae Class_Chlorobia Class_Deinococci
Class_Anaerolineae 0.00003723909
Class_Chlorobia 0.00003748186 0.00002796176
Class_Deinococci 0.00003170000 0.00001954124 0.00002000000
unknown 0.00635252816 0.00637999757 0.00638193215 0.00638352917
```

## ---------------------------

```
hc1 <- hclust(as.dist(vegdist(data.matrix(t(otus)), method="euclidean", na.rm=TRUE)), method="ward.D2")
hc2 <- hclust(as.dist(vegdist(data.matrix(otus), method="euclidean", na.rm=TRUE)), method="ward.D2")
par(mfrow=c(1,2))
plot(hc1); plot(hc2)
```

If you want a circular dendrogram, see A: how to draw circular dendrogram with distance information

Says that it is principal coordinates