- We have a table of relative abundances...
relabund <- matrix(rep(runif(20000)), ncol=20, nrow=100)
relabund[5,] <- c(runif(10,0,0.4), runif(10, 0.3,0.7))
colnames(relabund) <- c(paste0("Lean", 1:10), paste0("Obese", 1:10))
rownames(relabund) <- paste0("Species", 1:100)
treatments <- c(rep("lean", 10), rep("obese", 10))
head(relabund)
## Lean1 Lean2 Lean3 Lean4 Lean5 Lean6
## Species1 0.45992030 0.1428930 0.4322384 0.3729109 0.05659417 0.06476572
## Species2 0.03645101 0.5725126 0.9252554 0.6107523 0.11545734 0.11449512
## Species3 0.77170892 0.6552959 0.8607983 0.4644144 0.33418951 0.44612894
## Species4 0.75570539 0.7634057 0.1559501 0.5506424 0.69429557 0.84163000
## Species5 0.32899703 0.3241863 0.1874539 0.2455034 0.25689773 0.36368362
## Species6 0.47711036 0.5511257 0.6855532 0.5031633 0.06045581 0.39569183
## Lean7 Lean8 Lean9 Lean10 Obese1 Obese2
## Species1 0.6779481 0.5738132 0.8175298 0.8428322 0.65944885 0.4919339
## Species2 0.1648704 0.7982613 0.2866036 0.7992521 0.04250725 0.6212290
## Species3 0.8140707 0.3656166 0.1883101 0.7702504 0.30776358 0.1351630
## Species4 0.5965393 0.3391652 0.8025482 0.2769966 0.49466093 0.2824831
## Species5 0.1236927 0.3888515 0.3009191 0.1555885 0.39248920 0.4272460
## Species6 0.1396910 0.2977878 0.7089633 0.7007966 0.94012800 0.6098367
## Obese3 Obese4 Obese5 Obese6 Obese7 Obese8
## Species1 0.42922560 0.7522052 0.2156365 0.7145572 0.81468404 0.17986371
## Species2 0.03288946 0.3474433 0.4942115 0.8332294 0.55526575 0.04792325
## Species3 0.39247333 0.5468630 0.2921891 0.5850028 0.68829769 0.22548501
## Species4 0.74335846 0.9107194 0.6471540 0.6923879 0.47329088 0.28037523
## Species5 0.34735529 0.6330881 0.3266993 0.5208572 0.65454003 0.57744110
## Species6 0.94926348 0.1203434 0.8804260 0.1353925 0.03820587 0.60905916
## Obese9 Obese10
## Species1 0.58361216 0.3560410
## Species2 0.60881250 0.9367382
## Species3 0.27749078 0.5503687
## Species4 0.09470825 0.8734746
## Species5 0.60896504 0.5688232
## Species6 0.35554762 0.6061802