1

I have a taxonomic dataset that looks like this: enter image description here

I would like to plot a simple dendrogram that just shows the taxonomic relationships, and where line width or color would represent the abundance of the genus in the dataset. It seems that many of the packages in R want you to use hierarchical clustering or DNA-based data to create the dendrogram, but here I do not need to do that and can't find a package that can handle the data in this format. Is there a way to do this in R, or am I stuck using photoshop?

EDIT: Data for reproducible example:

structure(list(phylum = c("Arthropoda", "Arthropoda", "Arthropoda", 
"Arthropoda", "Arthropoda", "Arthropoda", "Arthropoda", "Arthropoda", 
"Arthropoda", "Arthropoda", "Arthropoda", "Arthropoda", "Arthropoda", 
"Arthropoda", "Arthropoda", "Arthropoda", "Arthropoda", "Arthropoda", 
"Arthropoda", "Arthropoda"), class = c("Insecta", "Insecta", 
"Insecta", "Arachnida", "Insecta", "Insecta", "Insecta", "Insecta", 
"Insecta", "Insecta", "Insecta", "Insecta", "Insecta", "Insecta", 
"Insecta", "Insecta", "Insecta", "Insecta", "Arachnida", "Insecta"
), order = c("Plecoptera", "Trichoptera", "Diptera", "Sarcoptiformes", 
"Diptera", "Trichoptera", NA, "Plecoptera", "Plecoptera", "Plecoptera", 
"Plecoptera", "Plecoptera", "Megaloptera", "Plecoptera", "Diptera", 
"Plecoptera", "Plecoptera", "Plecoptera", "Trombidiformes", "Plecoptera"
), family = c("Leuctridae", "Odontoceridae", "Chironomidae", 
"Malaconothridae", NA, "Hydropsychidae", NA, "Perlidae", "Leuctridae", 
"Leuctridae", "Leuctridae", "Leuctridae", "Corydalidae", "Perlidae", 
"Limoniidae", "Perlidae", "Perlidae", "Perlidae", "Aturidae", 
"Perlidae"), tribe = c(NA_character_, NA_character_, NA_character_, 
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_, 
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_, 
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_, 
NA_character_, NA_character_), genus = c("Leuctra", "Psilotreta", 
"Tanytarsus", "Malaconothrus", "Parametriocnemus", "Cheumatopsyche", 
NA, "Paragnetina", "Leuctra", "Leuctra", "Leuctra", "Leuctra", 
"Nigronia", "Paragnetina", "Hexatoma", NA, "Paragnetina", "Paragnetina", 
"Aturus", NA)), row.names = c(NA, 20L), class = "data.frame")
Quinten
  • 35,235
  • 5
  • 20
  • 53

0 Answers0