joey711/phyloseq — Issue #50: Create a merge_samples() function
Author: joey711
Created: 2011-11-16 00:41:44+00:00
State: open
Labels: Feature

Function should take as argument a phyloseq object that is (or contains) a sampleMap, as well as a variate name within the sampleMap's data.frame that will be used to condense the sampleMap via a rowsum() call.

If the primary argument class also contains an otuTable (that is, "otuSam" and its children), then the otuTable should be similarly condensed. The easiest way to achieve this is probably to split the otuTable from the complex object, orient as sample-by-species matrix, perform the identical rowsum() operation as above, and then re-join the two, while noting the new orientation of the otuTable.