So all of my labels are correctly colored except for one, which is a red circle instead of saying "D15F". My mentor ran the same codes and he did not have this problem. My rstudio is up to date. How do I get this to show the correct label? I've listed the codes below for reference
#NMDS analyses
WD <- "C:/Users/jacob/OneDrive/Documents/R/win-library/3.6/vegan/data"
setwd(WD)
require(vegan)
phylum.dat <- read.csv("Phylum data for R.csv", stringsAsFactors = T, header = T, row.names = 1)
diversity(phylum.dat, index = "shannon")
specnumber(phylum.dat) #species number
beta <- vegdist(phylum.dat, "jaccard", binary = TRUE) #jaccard distance
mean(beta)
dist(beta) #distance matrix
NMDS <- metaMDS(beta, distance = "jaccard", k = 2)
plot(NMDS, display = "sites", type = "text") #adds labels to plot
orditorp(NMDS, display = "sites", col = c(rep("red",4), rep("blue",4), rep("green",4))) #adds colors
Hi!
To help us help you, could you please prepare a repr oducible ex ample (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:
A minimal reproducible example consists of the following items:
A minimal dataset, necessary to reproduce the issue
The minimal runnable code necessary to reproduce the issue, which can be run
on the given dataset, and including the necessary information on the used packages.
Let's quickly go over each one of these with examples:
Minimal Dataset (Sample Data)
You need to provide a data frame that is small enough to be (reasonably) pasted on a post, but big enough to reproduce your issue.
Let's say, as an example, that you are working with the iris data frame
head(iris)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> 1 5.1 3.5 1.4 0.…
1 Like
system
Closed
April 16, 2020, 3:05pm
4
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.