I am using tapply to compress a large dataset on multiple species of plants grown under multiple conditions, in four separate experiments. tapply then spits an output summarized by species. I am trying to then pull these separate species out of the output for further analyses. So, tapply gives me this (from some dummy data) :
> tapply(results, list(trial,condition,species),mean)
>
, , species1
A B C D
1 -0.6357911 0.6127278 -0.23812194 -0.2769131
2 -0.3851283 -0.5955274 -0.08072294 -0.7298832
3 0.2029780 -1.0282842 0.11518872 -0.6522809
4 -0.2254586 0.4215911 -0.84305584 -0.1108188
, , species2
A B C D
1 -0.4762501 0.35766102 -0.53821633 -0.64798979
2 0.0558234 0.18602479 -0.48208241 1.09532972
3 -1.0695515 0.84401536 -0.02232301 -0.02064807
4 -0.2423312 -0.02145042 -0.18834442 -0.08221573
Where I get the mean of each species, under each condition (A-D), run in 4 separate experiments (1-4). Is it then possible, to, say, isolate species A, and then average 1-4 for each column?