Closed mikemc closed 3 years ago
This is actually only a problem when the group values are the numbers 1:n for some n; this triggers phyloseq::sample_data()
to change the new sample names to "sa1", etc. See Issue #53. Fix is to construct the new sample data object in a way skips this name adjustment.
This seems to not be fixed in general. It works on the enterotype
example above, but not on
sam <- tibble(sample_id = letters[1:3], group_var = 1:3) %>% sample_data
x <- merge_samples2(sam, "group_var")
sample_names(x); sample_variables(x)
Reprex below. Occurs if a factor whose labels are numbers, and if just integers. Likely related to phyloseq bugs involving sample names that are numbers.
Created on 2020-09-10 by the reprex package (v0.3.0)