I am stuck on trying to use the adonis3 and dmanova functions in the GUniFrac package in R. I am having trouble getting my feature table and distance matrix in the right format for the LHS part of the formula.
I import both tables into R with read.csv("file_name.csv", row.names=1).
If someone could just walk me through the step that I can get the distance table or feature table in the right format for this analysis, I would most appreciate it.
This is what I have tried so far:
adonis3(distance_matrx ~ metadata$variable1, data=metadata)
Error in G * t(hat): non-conformable arrays
I also tried to convert the feature table into a vegdist object. I am still getting errors though.
data.aitch<-vegdist(data, method="robust.aitchison", binary=FALSE, diag=TRUE, na.rm=FALSE)
adonis3(data.aitch~ metadata$variable1, data=metadata)
Error in G * t(hat): non-conformable arrays