adonis2(formula, data, permutations = 999, method = "bray", sqrt.dist = FALSE, add = FALSE, by = "terms", parallel = getOption("mc.cores"), ...)
so I see a 'formula' thats
otu_table( ps_relab_GEN) ~ sam_dat$group2
this part right?
but it doesnt look right to me as a formula because its got the $ to pick a variable from a different data set. and theres no explict data param.
can you maybe restruce the function call, to more explicitly set data, have all the variables in one data frame, and the formula cleanly naming them ?
probably will fix it up for you.