rvegan

nMDS, presence/ absence data does not show species scores. VEGAN R


I am using a presence/absence data frame with 335 sites and 31 species records of presence absence (0, 1) named "nmds_fish_wetlands_r". You can find the data in the link

https://github.com/sogm/nMDS_no_species_scores

I am using the following code:

dist.jac <- vegdist(nmds_fish_wetlands_r, method="jaccard", binary = T)


set.seed(42)
nmdsWISob  <- metaMDS(comm = dist.jac,
                      autotransform = FALSE,
                      wascores = TRUE,
                      engine = "monoMDS",
                      k = 3,
                      weakties = TRUE,
                      model = "global",
                      maxit = 300,
                      try = 40,
                      trymax = 100)

plot(nmdsWISob, display = "sites")
plot(nmdsWISob, display = "species")

I get the following error:

species scores not available Error in ordiplot(x, display = display, type = type, ...) : no scores found: nothing to plot

The version of R and vegan are:

R version 4.4.1 (2024-06-14 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows 10 x64 (build 19045)

vegan_2.6-6.1


Solution

  • That's because you supply dissimilarity (distance) matrix as a argument of metaMDS function. From the help:

    comm
    Community data. Alternatively, dissimilarities either as a dist structure or as a symmetric square matrix. In the latter case all other stages are skipped except random starts and centring and pc rotation of axes.

    Let's see what happens when a community data will be passed:

    nmds_fish_wetlands_r <- openxlsx::read.xlsx("~/Downloads/nmds_fish_wetlands_r.xlsx")
    
    set.seed(42)
    nmdsWISob  <- metaMDS(comm = nmds_fish_wetlands_r,
                          autotransform = FALSE,
                          wascores = TRUE,
                          engine = "monoMDS",
                          k = 3,
                          weakties = TRUE,
                          model = "global",
                          maxit = 300,
                          try = 40,
                          trymax = 100)
    
    plot(nmdsWISob, display = "sites")
    

    plot(nmdsWISob, display = "species")
    

    The dissimilarity data has own structure, without any species information:

    
    dist.jac <- vegdist(nmds_fish_wetlands_r, method="jaccard", binary = T)
    
    str(dist.jac)
    #>  'dist' num [1:55945] 1 0.5 0.667 0.75 1 ...
    #>  - attr(*, "maxdist")= num 1
    #>  - attr(*, "Size")= int 335
    #>  - attr(*, "Labels")= chr [1:335] "1" "2" "3" "4" ...
    #>  - attr(*, "Diag")= logi FALSE
    #>  - attr(*, "Upper")= logi FALSE
    #>  - attr(*, "method")= chr "binary jaccard"
    #>  - attr(*, "call")= language vegdist(x = nmds_fish_wetlands_r, method = "jaccard", binary = T)
    
    
    

    Created on 2025-08-01 with reprex v2.1.1.9000