André Soares
André Soares

Reputation: 309

Merge by average and plot alternate data from table

I used estimateR (vegan) to generate this table from mothur outputs. However, so far, I am unable to go on with this, being that I am not aware of how to plot from tables...

row.names   ALG.1   ALG.2   ALG.3   ALG.4   ALG.4   ALG.5   ALG.6   ALG.7   ALG.8   ALG.9   ALG.10  ALG.11  ALG.12  ALG.13  ALG.14  ALG.15  ALG.16  ALG.17  ALG.18  ALG.19  ALG.20  ALG.21  ALG.22  ALG.23  ALG.24  ALG.15
S.obs   244.000000  274.00000   432.00000   616.00000   428.00000   544.00000   550.00000   237.00000   428.00000   411.00000   296.00000   409.00000   673.00000   409.00000   692.00000   403.00000   550.00000   513.00000   434.0000    416.00000   521.00000   586.00000   525.00000   507.00000   737.00000   192.000000
S.chao1 410.000000  488.34483   716.28571   1353.04000  624.41892   797.57391   912.66667   577.00000   820.09091   708.15873   507.45161   649.05455   958.33835   731.05556   1139.96330  615.89831   840.75258   808.66250   638.2500    730.20755   884.03797   1041.48913  801.89655   903.51316   1256.44444  235.555556
se.chao1    52.378560   58.30493    55.19781    120.11798   40.23044    43.30181    62.21725    88.81297    73.45103    59.21679    56.35563    51.88047    45.57582    66.61600    69.60445    45.99529    50.79424    54.64472    41.8505 65.66254    64.93072    74.54944    50.48197    70.74512    73.41056    16.410243

I wish I could be a little more proficient with R, but I am struggling to perform two tasks:

1. Averaging sample values into groups as following:

ALG.1   Cviri
ALG.2   Cviri
ALG.3   Cviri
ALG.4   Ccela
ALG.5   Pfict
ALG.6   Pfict
ALG.7   Pfict
ALG.8   Dfrag
ALG.9   Dfrag
ALG.10  Dfrag
ALG.11  Ccela
ALG.12  Ccela
ALG.13  Ccela
ALG.14  Ccela
ALG.15  Ccela
ALG.16  Ccela
ALG.17  Pfict
ALG.18  Pfict
ALG.19  Pfict
ALG.20  Pfict
ALG.21  Pfict
ALG.22  Pfict
ALG.23  Pfict
ALG.24  Pfict
ALG.25  Pfict
ALG.26  Cviri

(sorry for the huge list)

2. Plot bar plots (S.obs and S.chao1 side by side) for all species (Cviri, Ccela, Pfict, Dfrag), with se.chao1 as the standard error for S.chao1.

Thank you in advance for any the help you can give!

Cheers! André

Upvotes: 0

Views: 42

Answers (0)

Related Questions