I am currently making PCoA plots on Presence/Absence community data. My rows are populated with samples and my column headings are different taxa that were detected. However, since the experiment is a degradation experiment, some of the samples have rows filled with zeros (absences). The only way the distance matrix calculation will work is if I remove these zero-filled rows. However, since these rows are biologically meaningful (it means nothing was present after decay) and not just missing data, I was wondering if there was a way to keep them and avoid the "NaN" error I would get otherwise.
I am using the package 'vegan' and the function 'vegdist' to calculate my distance matrix.
Here is an example of the code:
distance_matrix <- vegdist(data, method = "jaccard", binary=TRUE)
pco <- pco(distance_matrix, negvals = "zero")
NaN
values are coming from a divide-by-zero issue when the union is empty. $\endgroup$