joey711/phyloseq — Issue #48: merge_phyloseq() bug when merging heterogeneous objects
Author: joey711
Created: 2011-11-03 00:11:40+00:00
State: open
Labels: Bug

merging a sampleMap component and an otuTree object:

```R

merge_phyloseq( myotutree, mysamplemap)
```

Returns the following error:
```

Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) :
'x' must be atomic

As does `phyloseq( myotutree, mysamplemap)`, although the latter shouldn't work with one complex object and one component.

This looks as though otuTree is not being splatted appropriately? Unclear what the bug is.

It does appear to be a bug, because simply subsetting each component, and then recombining with `phyloseq()` creates the expected `otuSamTree` object without errors. In other words, the following does work with the same data as above:

```R

phyloseq(otuTable(myotutree), mysamplemap, tre(myotutree))
```