R语言vegan包使用教程(15)
时间:2025-07-13
时间:2025-07-13
R语言中的外在软件包“Vegan”是专门用于群落生态学分析的工具。Vegan能够提供所有基本的排序方法,同时具有生成精美排序图的功能,版本更新很快。我们认为Vegan包完全可以取代CANOCO,成为今后排序分析的首选统计工具。
3ENVIRONMENTALINTERPRETATION Thearrowpointstothedirectionofmostrapidchangeinthetheenvironmentalvariable.Oftenthisiscalledthedirectionofthegradient.
Thelengthofthearrowisproportionaltothecorrelationbetweenordinationandenvironmentalvariable.Oftenthisiscalledthestrengthofthegradient.
Fittingenvironmentalvectorsiseasyusingfunctionenvfit.Theexampleusesthepreviousnmdsresultandenvironmentalvariablesinthedatasetvarechem:
>data(varechem)
>ef<-envfit(vare.mds,varechem,permu=999)>ef***VECTORS
NMDS1NMDS2r2Pr(>r)
N-0.0573-0.99840.250.036*P0.61970.78480.190.101K0.76650.64230.180.114Ca0.68520.72830.410.003**Mg0.63250.77450.430.004**S0.19140.98150.180.132Al-0.87160.49020.530.001***Fe-0.93600.35200.450.001***Mn0.7987-0.60170.520.001***Zn0.61760.78650.190.108Mo-0.90310.42940.060.512Baresoil0.9249-0.38030.250.055.Humdepth0.9328-0.36040.520.003**pH-0.64800.76170.230.060.---Signif.codes:0‘***’0.001‘**’0.01‘*’0.05‘.’0.1‘’1Pvaluesbasedon999permutations.
The rsttwocolumnsgivedirectioncosinesofthevectors,andr2givesthesquaredcorrelationcoe cient.Forplotting,theaxesshouldbescaledbythesquarerootofr2.Theplotfunctiondoesthisautomatically,andyoucanextractthescaledvalueswithscores(ef,"vectors").Thesigni cances(Pr>r),orP-valuesarebasedonrandompermutationsofthedata:ifyouoftengetasgoodorbetterR2withrandomlypermuteddata,yourvaluesareinsigni cant.
Youcanaddthe ttedvectorstoanordinationusingplotcommand.Youcanlimitplottingtomostsigni cantvariableswithargumentp.max.Asusual,moreoptionscanbefoundinthehelppages.
>plot(vare.mds,display="sites")>plot(ef,p.max=0.1)
3.2Surface tting
Vector ttingispopular,anditprovidesacompactwayofsimultaneouslydisplayingalargenumberofenvironmentalvariables.However,itimplies
15
3.2Surface tting
q
4
.0q
q
Mgq
Ca
AlpHq
q
2
.0Fe
q
2
qSq
D0
.q
M0Nq
q
q
q
q
q
q
q
Baresoil
2
q
.Humdepth
0 q
q
Mn
q
N
4
.0 q
0.4 0.20.00.20.40.6
NMDS1