When providing the metadata_sample attribute to the metadata_analysis() function I encountered two uncaught errors:
-
If the provided dataframe (containing metadata info) has at least one column with not more than two unique values/levels, the aov() function throws an error because it cannot compute contrasts. E="Contrasts can only be applied to factors with 2 or more levels" -> All columns must have at least two levels
-
If the provided dataframe is not all factors, there is another error in the stats::TukeyHSD function. E="No factors in the fitted model"