I think this is a very basic question, but I have spent several hours searching for an answer but am not able to apply what I find to my specific problem.
I have two tables:
- a community data table in which each row is a the proportion of species in each site and each row is the site, and…
- a metadata table in which each row is a site and each column is a category describing some attribute of the site.
Very simply I would like to summarize the community data by a specific category of the metadata. How would I make a simple barplot of the relative contribution of each species in sites summarized by category? Perhaps:
barplot(commData, metadata$category)