Closed JBL05 closed 2 years ago
Problem fixed by calculate bet_diversity distance matrix before using function trans_beta, sorry!
Hi all.
I had the same problem here, but did not found the function to calculate the beta diversity matrix as you showed.
Can anyone help me, please?
Just found here.
dataset$cal_betadiv(method = "bray")
Hi, I am a little stuck on this point as well and was wondering if you had a bit more detail on how to prevent the error. After you use dataset$cal_betadiv(method = "bray") how do you then use the output, so that you then get to the point where trans_beta$new(dataset = dataset, group = "Reach", measure = "bray") will work? For context I was then going to go straight into t1$cal_ordination(ordination = "PCoA") etc.
EDIT: Sorry, understand now. Was getting error due to issues with data frames used
Good question! trans_beta can use dataset$beta_diversity$bray matrix. So current logic is 1) dataset$cal_betadiv(method = "bray")
can generate dataset$beta_diversity$bray 2) t1 <- trans_beta$new(dataset = dataset, group = "Reach", measure = "bray")
can generate a t1 with bray in t1 in order for other operations calling bray matrix. To make the step simple, I will add a checking step in the function to automatically calculate bray if a microtable object is found without beta diversity matrix.
Thanks Chi!
Can anyone help, plz?