I'm a beginner and i have a question regarding Shannon and Simpson index. I have a raw count table that looks like this
Datasets R21P2_BS_sortme_non_rRNA_diamond R22P1_BS_sortme_non_rRNA_diamond R22P4_BS_sortme_non_rRNA_diamond R22P6_BS_sortme_non_rRNA_diamond R23P4_BS_sortme_non_rRNA_diamond R23P5_BS_sortme_non_rRNA_diamond R22P2_BS_sortme_non_rRNA_diamond R22P3_BS_non_rRNA_diamond
Candidatus Koribacter 0 0 0 0 0 0 0 0
Candidatus Koribacter versatilis 6450.7397 3675.8171 2588.1077 2657.2302 2345.8489 0 6476.0293 6215.4624
Candidatus Sulfotelmatomonas 0 0 0 0 0 0 0 0
Candidatus Sulfotelmatomonas gaucii 0 0 0 0 0 2988 0 0
Edaphobacter 2452.491 2315.793 0 0 2334.1106 955 3006.5918 2504.095
Edaphobacter modestus 0 0 0 0 0 2791 0 0
Occallatibacter 0 0 0 0 0 0 0 0
Occallatibacter savannae 3342.1418 0 0 0 0 0 2275.6936 0
unclassified Acidobacteriales 713.793 1381.9713 371.48083 372.63043 413.5484 0 1512.612 1004.95465
Acidobacteriales bacterium 1989.0435 2009.239 2346.533 2188.6824 2098.4421 0 2224.878 2977.275
Bryobacterales 92.96951 63.00996 77.73442 82.42516 65.914925 47 74.10613 63.01696
Bryobacteraceae 632.5847 539.4786 575.83264 574.2777 421.6749 344 999.37415 679.9198
Paludibaculum 0 0 0 0 0 0 0 0
Paludibaculum fermentans 5697.7427 3003.9468 3720.4888 3304.1206 2315.1487 2032 4642.855 4024.7937
Solibacteraceae 43.124413 14.159542 25.562664 24.5313 26.185379 26 37.688263 28.744577
and a metadata file:
id,day,yield
R21P2_BS_sortme_non_rRNA_diamond,0,1
R22P1_BS_sortme_non_rRNA_diamond,30,1
R22P4_BS_sortme_non_rRNA_diamond,30,0
R22P6_BS_sortme_non_rRNA_diamond,30,0
R23P4_BS_sortme_non_rRNA_diamond,60,0
R23P5_BS_sortme_non_rRNA_diamond,60,0
R22P2_BS_sortme_non_rRNA_diamond,30,1
R22P3_BS_non_rRNA_diamond,30,1
I would like to get both shannon and simpson diversity and then plot them by 'yield' and 'day', so it looks like this
How do i go about it using vegan package? especially getting the both shannon and simpson index out. Help will be much appreciated. Thank you in advance.


