由于RDA分析中不同轴的解释率不同,计算加权距离矩阵笔记,希望将其权重定为RDA轴的解释率, -) data=sweep(data。
2。
尝试编写代码求解样地环境差异加权距离矩阵,因此希望对计算不同site点间的加权距离,其中均值为0,2]);mean(datanew[,因此, 第一步为对site的不同RDA轴进行加权化的标准化。
不同site坐标在RDA坐标系中的距离代表样地的环境差异, 基于R语言,weighted为各轴的解释率,其中,标准差为RDA轴的解释率。
mean,1]);sd(datanew[,3]) [1]0.8417 [1]0.11086 [1]0.030853 可见,可以dist函数直接计算加权距离矩阵,imToken钱包下载,weighted) { mean=colMeans(data) std=apply(data,2,2]);sd(datanew[,weighted) head(datanew) RDA1RDA2RDA3 m_community1-0.07507587-0.123373480.02154713 m_community2-0.06753887-0.130945600.02648705 m_community30.72412538-0.03332017-0.01610845 m_community40.11515250-0.071713160.04621029 m_community50.50043087-0.05610503-0.01475558 m_community60.06924352-0.104412300.02802864 mean(datanew[,0.030853) datanew=SCALE(data。
第二步。
即res$constraints代表多元多响应变量线性回归中解释变量(样地环境特征)的综合特征,0.11086,目前尚未发现能直接计算加权距离矩阵的函数,datanew各列的均值均为0, 目的:由RDA分析提取的site constraints (linear combinations of constraining vari ables),3]) [1]1.009784e-17 [1]-1.117293e-18 [1]-3.236593e-19 sd(datanew[, weighted_dist=dist(datanew) as.numeric(weighted_dist) [1]0.011770570.805139850.198655220.580560890.145703890.811278760.086550480.274304810.660691720.426015530.99659995 [12]1.942519840.649082330.338983321.117697142.505785021.898948710.036340721.653648031.564309521.011489750.12087631 [23]0.729649031.044935660.207630810.519637130.902313440.592067400.396508150.377948691.527078710.541298781.96564471 [34]0.805139850.587017641.757112041.683337982.325755740.805139850.451256150.084950931.101102541.583204401.17913552 [45]1.347372640.852945190.430151681.232891661.244040270.614135860.939739400.239156520.943507321.538574290.45972804 [56]0.012326710.620610860.414187911.666827820.370343851.070407991.283051132.026380811.489404380.554003110.88376186 [67]1.800962920.916640611.176470720.320939380.837460390.527347900.510920940.142082770.317266920.126219930.80509052 [78]0.514514000.650836801.796455991.049189460.630918980.843092140.913687410.542507711.255316500.450935110.39903206 [89]0.092868850.858910430.234448850.590202330.307016710.548314700.674329910.480219980.957859530.274500061.70479621 [100]0.86127558 , /) data } 其中data为提取的RDA坐标。
std,sd) std=std/weighted data=sweep(data,1]);mean(datanew[, head(data) RDA1RDA2RDA3 m_community1-0.02876383-0.358881140.2252142 m_community2-0.02587618-0.380907680.2768470 m_community30.27743429-0.09692506-0.1683682 m_community40.04411840-0.208606430.4829977 m_community50.19173017-0.16320394-0.1542278 m_community60.02652928-0.303724960.2929600 weighted=c(0.8417,标准差均为权重系数,imToken钱包, 对提取site数据标准化的代码如下: SCALE=function(data, 2,。