Questions tagged [vegdist]
10 questions
3
votes
1 answer
R metaMDS ordination distances
I have been doing some ordinations on a data set that I have of abundances of species at different sampling points. I am using metaMDS() in vegan to do this. With this function you can either:
enter directly the community data (sites in rows and…

Caitlyn_D
- 33
- 1
- 6
3
votes
2 answers
Error when performing an NMDS in R using package vegdist
I'm trying to perform an NMDS in R using the vegan package on a data set that has plots as columns and species counts as columns. My data is in the format of a text file (tab delimited) and contains a lot of '0' species counts. However, when I try…

user1182741
- 93
- 1
- 3
- 7
1
vote
1 answer
calculating bray curtis dissimilarity between each treatment to control within each group
I need to calculate bray curtis dissimilarity of two treatments to a control. but this is nested by site. if I use the entire dataframe, the bray curtis dissmilarity takes into account distances between sites, which I need to avoid. below is a mock…

Felipe Albornoz
- 21
- 2
1
vote
1 answer
Bray–Curtis distance calculation method in Complexheatmap?
I'm using the Complexheatmap function (or "Heatmap") in R and was wondering if there was a way to use the Bray-Curtis method in calculating col/row distance (with ward.D2 clustering method) since it's not a supported method in Complexheatmap. I need…

Nate
- 411
- 2
- 10
0
votes
0 answers
How do I use the adonis3 function in the GUniFrac package?
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…

Sterling Wright
- 5
- 2
0
votes
0 answers
Which distance matrix to compute on my absence/presence dataset with many zeros?
I am doing analyses on a dataset of parasite species present or absent in bee samples.
I have a matrix with 0/1 for each sample and each parasite species.
Since a lot of samples do not have any parasite species, a lot of the rows are all zeroes.
I…
0
votes
1 answer
how to preform a PCoA with constraind factors
I have performed the following PCoA, using the following code:
spe.dist <- vegdist(spe, method = "bray")
spe.braysq.pcoa <- pcoa(sqrt(spe.dist))
biplot.pcoa(spe.braysq.pcoa, sqrt(spe))
However, I now want to perform a constrained PCoA. I want…

Herbuiten
- 13
- 3
0
votes
0 answers
How to split vegdist matrices according to geographic distance to perform Mantel or MRM analysis?
I am using vegan Mantel and partial Mantel tests to infer the correlation between those two matrices. Since I have distance ranging from 0 to 400 km, I want to split those matrices in two groups:
Mantel comparing A and B from 0 to 114 km (threshold…

Dennis Göss
- 1
- 2
0
votes
1 answer
Should I use vegdist or dist for hclust?
I am trying to do a hierarchical cluster analysis with binary data, and for the distance matrix I applied the function vegdist() from vegan package:
dist.jac <- vegdist(final_df, method="jaccard", binary = TRUE)
Next, I used the function hclust but…

Inês Pereira
- 3
- 1
0
votes
0 answers
Compute dissimilarity matrix in R
I wanted to compute a dissimilary matrix IN R by using the following code.
a <- A[,-c(2,3,4)]
b <- a[-c(201:321), ]
b <- unlist(b)
library(vegan)
PD.dist <- vegdist(b, method = "jaccard", binary = TRUE)
Pd.dist
The software R put the following…

aweman
- 1
- 2