0

In the vegan package, I tried to make a ordination plot with species as objects and environmental variables as vectors. However the environmental variables are regarded as centroids instead of factors. Strangely each data frame cell is seen as an environmental factor, so I think the dataframe is not structured correctly. When I plot the ordination without environmental variables I don't get any problems.

summary(gutter.dca)


environfit = envfit(gutter.dca,gutterenv)

> head(environfit)

    $vectors
    NULL

    $factors
    Centroids:
                                   DCA1    DCA2
    vocht0,246435845            -0.2185 -1.0601
    vocht0,249249249             0.1932 -1.1339
    vocht0,251497006             0.0331 -2.0888
    vocht0,264735265            -0.3353 -1.3403
    vocht0,26911315             -0.0017 -0.9498
    vocht0,272369715            -1.0733  0.0021

Species dataframe

head(gutter)

     Acer.campestre Acer.pseudoplantanus Adoxa.moschatellina Aegopodium.podagraria Ajuga.reptans
Q1-1              0                    0                   5                     0             0
Q1-2              0                   70                  15                    20             0
Q1-3              0                   15                   0                     0             0
Q1-4              0                    3                   0                     0             0
Q2-1              0                    3                   0                     0             0
Q2-2              1                    0                   0                     0             0

Environmental variables dataframe

head(gutterenv)

        vocht Ph.H2O ph.KCl mg.NO3.kg.soil mg.NH4.N.kg.soil litter.depth..cm.
1  0,26911315   7,41  6,686    2,811031105      4,674304351               7,5
2 0,246435845  7,225  6,349    2,567981088      6,735395066               6,5
3 0,264735265  7,001  6,491    2,336821354      8,400116244               5,1
4 0,325123153  6,732  5,444    2,518858082      7,684506342              8,25
5    0,446875   6,87   7,45    2,443686352      9,886923756                 4
6 0,548476454    8,1   7,05    3,144954614       11,3179919                 3
Sam Vanbergen
  • 145
  • 3
  • 11
  • 1
    Do you work on a locale and version of R that accepts comma (",") as a decimal mark? I have only used R where period (full stop, ".") can be used as a decimal mark. Values with comma are regarded as character strings in my R, and `envfit` regards character strings as factors. – Jari Oksanen May 29 '18 at 11:20
  • I changed the comma's to dots and it worked, thank you! :) – Sam Vanbergen May 29 '18 at 11:38

0 Answers0