我如何使用纯素软件包在R中计算SIMPER?

时间:2019-06-11 04:39:00

标签: r vegan

我们怎么样?

我是从业者,使用R中的vegan包来计算SIMPER。 我有一组有关海洋鱼类种类和位置的数据。现在,我想使用我的数据来计算SIMPER。我该怎么办?

我试图找到SIMPER的教程。但还是很困惑

example 需要两组数据。 (dunedune.env)。

Data(dune)
str(dune)
'data.frame':   20 obs. of  30 variables:
 $ Achimill: num  1 3 0 0 2 2 2 0 0 4 ...
 $ Agrostol: num  0 0 4 8 0 0 0 4 3 0 ...
 $ Airaprae: num  0 0 0 0 0 0 0 0 0 0 ...
 $ Alopgeni: num  0 2 7 2 0 0 0 5 3 0 ...
 $ Anthodor: num  0 0 0 0 4 3 2 0 0 4 ...
 $ Bellpere: num  0 3 2 2 2 0 0 0 0 2 ...
 $ Bromhord: num  0 4 0 3 2 0 2 0 0 4 ...
 $ Chenalbu: num  0 0 0 0 0 0 0 0 0 0 ...
 $ Cirsarve: num  0 0 0 2 0 0 0 0 0 0 ...
 $ Comapalu: num  0 0 0 0 0 0 0 0 0 0 ...
 $ Eleopalu: num  0 0 0 0 0 0 0 4 0 0 ...
 $ Elymrepe: num  4 4 4 4 4 0 0 0 6 0 ...
 $ Empenigr: num  0 0 0 0 0 0 0 0 0 0 ...
 $ Hyporadi: num  0 0 0 0 0 0 0 0 0 0 ...
 $ Juncarti: num  0 0 0 0 0 0 0 4 4 0 ...
 $ Juncbufo: num  0 0 0 0 0 0 2 0 4 0 ...
 $ Lolipere: num  7 5 6 5 2 6 6 4 2 6 ...
 $ Planlanc: num  0 0 0 0 5 5 5 0 0 3 ...
 $ Poaprat : num  4 4 5 4 2 3 4 4 4 4 ...
 $ Poatriv : num  2 7 6 5 6 4 5 4 5 4 ...
 $ Ranuflam: num  0 0 0 0 0 0 0 2 0 0 ...
 $ Rumeacet: num  0 0 0 0 5 6 3 0 2 0 ...
 $ Sagiproc: num  0 0 0 5 0 0 0 2 2 0 ...
 $ Salirepe: num  0 0 0 0 0 0 0 0 0 0 ...
 $ Scorautu: num  0 5 2 2 3 3 3 3 2 3 ...
 $ Trifprat: num  0 0 0 0 2 5 2 0 0 0 ...
 $ Trifrepe: num  0 5 2 1 2 5 2 2 3 6 ...
 $ Vicilath: num  0 0 0 0 0 0 0 0 0 1 ...
 $ Bracruta: num  0 0 2 2 2 6 2 2 2 2 ...
 $ Callcusp: num  0 0 0 0 0 0 0 0 0 0 ...
Data(dune.env)
str(dune.env)
'data.frame':   20 obs. of  5 variables:
 $ A1        : num  2.8 3.5 4.3 4.2 6.3 4.3 2.8 4.2 3.7 3.3 ...
 $ Moisture  : Ord.factor w/ 4 levels "1"<"2"<"4"<"5": 1 1 2 2 1 1 1 4 3 2 ...
 $ Management: Factor w/ 4 levels "BF","HF","NM",..: 4 1 4 4 2 2 2 2 2 1 ...
 $ Use       : Ord.factor w/ 3 levels "Hayfield"<"Haypastu"<..: 2 2 2 2 1 2 3 3 1 1 ...
 $ Manure    : Ord.factor w/ 5 levels "0"<"1"<"2"<"3"<..: 5 3 5 5 3 3 4 4 2 2 ...
(sim<-with(dune.env,simper(dune,Management)))
summary(sim)
$SF_BF
  Agrostol   Alopgeni   Lolipere   Trifrepe    Poatriv   Scorautu   Bromhord 
0.09824271 0.18254830 0.25956958 0.33367870 0.40734444 0.47729205 0.53120026 
  Achimill   Planlanc   Elymrepe   Bracruta 
0.57946526 0.62522255 0.67016196 0.71098133 

$SF_HF
  Agrostol   Alopgeni   Lolipere   Planlanc   Rumeacet   Elymrepe    Poatriv 
0.08350879 0.16534834 0.23934930 0.30843624 0.37716139 0.43334492 0.48351753 
  Bracruta   Eleopalu    Poaprat   Anthodor   Sagiproc   Trifprat 
0.52804045 0.57205850 0.61423981 0.65549838 0.69628951 0.73696831 

$SF_NM
  Poatriv  Alopgeni  Agrostol  Lolipere  Eleopalu   Poaprat  Bracruta  Elymrepe 
0.1013601 0.1935731 0.2667383 0.3377578 0.3999419 0.4526707 0.5044725 0.5505643 
 Scorautu  Trifrepe  Sagiproc  Salirepe 
0.5926117 0.6320111 0.6712478 0.7091528 

$BF_HF
  Rumeacet    Poatriv   Planlanc   Bromhord   Lolipere   Elymrepe   Trifrepe 
0.08163219 0.15193797 0.21918333 0.27967181 0.33969561 0.39843338 0.45298204 
  Anthodor   Achimill   Bracruta   Alopgeni   Trifprat   Juncarti 
0.50276849 0.55222648 0.60021994 0.64584333 0.69126471 0.73366621 

$BF_NM
 Lolipere   Poatriv   Poaprat  Trifrepe  Bromhord  Bracruta  Eleopalu  Agrostol 
0.1242718 0.1992126 0.2711756 0.3414609 0.3958520 0.4448077 0.4910724 0.5369083 
 Achimill  Scorautu  Anthodor  Planlanc 
0.5823926 0.6253645 0.6638182 0.7012577 

$HF_NM
   Poatriv   Lolipere   Rumeacet    Poaprat   Planlanc   Bracruta   Eleopalu 
0.09913221 0.17468460 0.23917190 0.29701331 0.35469313 0.40365488 0.44804851 
  Agrostol   Trifrepe   Elymrepe   Anthodor   Juncarti   Trifprat   Salirepe 
0.49226546 0.53434466 0.57564661 0.61543243 0.65341300 0.68921695 0.72432408 


Contrast: SF_BF 

          average       sd  ratio    ava    avb  cumsum
Agrostol 0.061374 0.034193 1.7949 4.6667 0.0000 0.09824
Alopgeni 0.052667 0.036476 1.4439 4.3333 0.6667 0.18255
Lolipere 0.048116 0.039445 1.2198 3.0000 6.0000 0.25957
Trifrepe 0.046297 0.025525 1.8138 1.3333 4.6667 0.33368
Poatriv  0.046020 0.033801 1.3615 4.6667 3.6667 0.40734
Scorautu 0.043697 0.024922 1.7534 1.3333 4.3333 0.47729

我无法理解这两者之间的联系,也无法弄清楚R如何计算才能应用于my data

'data.frame':   20 obs. of  603 variables:
 $ Abalistes.stellaris            : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Abudefduf.sexfasciatus         : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Acanthocepola.indica           : num  0 1.09 0 0 0 ...
 $ Acanthocepola.krusensternii    : num  80 2.61 1.48 34.19 0 ...
 $ Acanthocepola.limbata          : num  0 0 0 5.3 0 ...
 $ Acanthopagrus.australis        : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Acentrogobius.caninus          : num  0 10.3 16.3 0 0 ...
 $ Acentrogobius.nebulosus        : num  0 0 0 0 0 ...
 $ Acetes.sp.                     : num  0 0 0 0 0 ...
 $ Aesopia.cornuta                : num  0 0 0 3.87 0 ...
 $ Alectis.ciliaris               : num  0.97 0 0 0 0 0 0 1.07 0 0 ...
 $ Alectis.indicus                : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Alepes.djedaba                 : num  0 0 0 0 2.31 0 0 0 0 0 ...
 $ Alepes.kleinii                 : num  0 0 0 83.5 33.2 ...
 $ Alepes.melanoptera             : num  11.84 2.61 1.59 2.11 2.31 ...
 $ Alepes.vari                    : num  4.9 0 0 0 0 0 0 0 0 0 ...
 $ Allenbatrachus.grunniens       : num  1.11 0 1.71 0 0 ...
 $ Alpheidae                      : num  0 0 5 0 0 0 0 0 5 24 ...
 $ Alpheus.digitalis              : num  0 0 0 0 0 0 4.71 0 0 0 ...
 $ Alpheus.sp.                    : num  0 0 0 0 0 ...
 $ Aluterus.monoceros             : num  0 0 0 1.94 1.79 0.95 0 0 0 1.94 ...
 $ Aluterus.scriptus              : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Ambassis.vachellii             : num  0 0 0 0 4.62 0 0 0 0 0 ...
 $ Amblygobius.sp.                : num  0 0 0 0 4 0 0 90 16 6.4 ...
 $ Amusium.japonicum              : num  0 0 0 0 0 0 0 1.02 0.95 0 ...
 $ Amusium.pleuronectes           : num  12 104.24 27.46 33.63 1.15 ...
 $ Anacanthus.barbatus            : num  0 0 0 0 0 0 0 7.5 0 0 ...
 $ Anadara.pilula                 : num  0 0 0 0 0 0 0 32 0 0 ...
 $ Anadara.subcrenata             : num  0 0 0 0 0 0 1.18 0 0 0 ...
 $ Anchisquilla.fasciata          : num  0 10.4 0 0 0 ...
 $ Anodontostoma.chacunda         : num  0 0 0 0 0 0 1.07 1.15 0 0.8 ...
 $ Antennarius.nummifer           : num  0 0 0 0 0 0 0 0 2.69 0 ...
 $ Antennarius.striatus           : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Apistus.alatus                 : num  0 0 15 0 0 ...
 $ Apistus.carinatus              : num  1.25 50.65 23.05 72.62 0 ...
 $ Apistus.evolans                : num  0 132 0 0 0 ...
 $ Aploactis.aspera               : num  0 0 0 0 0 0 0 0 0 1 ...
 $ Apogon.amboinensis             : num  0 10.2 0 0 55.4 ...
 $ Apogon.carinatus               : num  0 0 0 793 0 ...
 $ Apogon.cavitiensis             : num  0 0 0 0 0 0 0 6 0 0 ...
 $ Apogon.ellioti                 : num  0 12.8 52 8 12.9 ...
 $ Apogon.fasciatus               : num  0 0 0 0 0 ...
 $ Apogon.kiensis                 : num  0 104 0 115 287 ...
 $ Apogon.lineatus                : num  0 0 118 306 612 ...
 $ Apogon.niger                   : num  0 0 0 0 140 ...
 $ Apogon.poecilopterus           : num  0 96 0 0 0 ...
 $ Apogon.quadrifasciatus         : num  0 34.9 36 432.3 110.1 ...
 $ Apogon.semilineatus            : num  0 15.3 0 192 24 ...
 $ Apogon.sp.                     : num  0 0 0 0 0 0 0 0 0 0.8 ...
 $ Apogon.striatus                : num  0 5.45 0 148 260.52 ...
 $ Apogon.truncatus               : num  0 31.6 43.2 36 63.1 ...
 $ Apogonichthys.sp.              : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Apogonidae                     : num  0 0 0 1210 107 ...
 $ Argyrosomus.japonicus          : num  0 0 0 0 0 0 0 0 0 6.86 ...
 $ Ariomma.indica                 : num  0 0 0 0 0 1.11 0 0 0 0 ...
 $ Ariosoma.anago                 : num  0 0 0 0 3.91 0 0 0 0 0 ...
 $ Aristeomorpha.foliacea         : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Arius.maculatus                : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Arius.sinensis                 : num  0 0 0 0 0 0 0 0 0 0.86 ...
 $ Arius.thalassinus              : num  0 0 0 0 0 0 0 0 16 13.6 ...
 $ Arius.venosus                  : num  0 0 0 26 0 0 0 0 0 25 ...
 $ Arnoglossus.japonicus          : num  0 0 0 0 0 ...
 $ Arothron.caeruleopunctatus     : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Aseraggodes.kobensis           : num  0 0 0 326 0 ...
 $ Astrapogon.stellatus           : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Atelomycterus.marmoratus       : num  0 0 0 0 0 0 0 0 0 2.67 ...
 $ Atropus.atropos                : num  0 0 0 0 0.95 0.95 0 0 0 0 ...
 $ Atule.mate                     : num  0 0 0.86 2.23 10.47 ...
 $ Atypopenaeus.stenodactylus     : num  0 0 0 0 41.7 ...
 $ Aulopareia.unicolor            : num  0 0 0 0 0 0 0 1 0 0 ...
 $ Bathycallionymus.kaianus       : num  3.87 0 0 304.69 0 ...
 $ Batrachomoeus.trispinosus      : num  0 0 0 0 0 ...
 $ Bothus.myriaster               : num  0 1.09 0 83.48 0 ...
 $ Brachirus.panoides             : num  0 16 0 0 0 ...
 $ Brachypleura.novaezeelandiae   : num  0 0 322 396 145 ...
 $ Bregmaceros.japonicus          : num  0 0 0 0 0 0 0 0 0 8 ...
 $ Bregmaceros.macclellandii      : num  0 0 27.4 37.6 66.4 ...
 $ Bufonaria.rana                 : num  0 0 0 0 0 ...
 $ Calappa.clypeata               : num  0 0 0 0 0 0 0 1 0 0 ...
 $ Calappa.hepatica               : num  1.03 0 0 0 0 0 0 0 0 76.8 ...
 $ Calappa.philagius              : num  0 0 0 0 0.9 0.9 0 0 0 1 ...
 $ Callionymidae                  : num  0 0 0 30 0 0 0 0 0 30 ...
 $ Callionymus.filamentosus       : num  0 13.71 0.86 154.84 0 ...
 $ Callionymus.japonicus          : num  0 0 0 0 67.4 ...
 $ Callionymus.meridionalis       : num  0 0 0 0 0 ...
 $ Callionymus.planus             : num  0 0 0 0 0 0 0 360 256 1.94 ...
 $ Callionymus.sp.                : num  0 312 382 140 0 ...
 $ Callionymus.virgis             : num  61.5 0 116.2 0 0 ...
 $ Callogobius.maculipinnis       : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Carangoides.chrysophrys        : num  0 20.43 0 1.05 0 ...
 $ Carangoides.malabaricus        : num  2.45 0.86 1.71 0 1.02 ...
 $ Carangoides.praeustus          : num  0 0 0 0 0 0 0 0 2 0 ...
 $ Caranx.sexfasciatus            : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Carcinoscorpius.rotundicauda   : num  0 0 0 0 0 0 0 0 0 2.77 ...
 $ Carinosquilla.carinata         : num  0.97 1.09 0 0 0 0 0 0 0 0 ...
 $ Carinosquilla.multicarinata    : num  0 1 0 31 52.7 ...
 $ Centriscus.cristatus           : num  0 16 0 1 2.18 ...
 $ Centriscus.scutatus            : num  0 12 0 0 0 0 0 11.5 10 0 ...
 $ Cephalopholis.boenak           : num  0.97 0 0 0 0 0 0 0 0 0 ...

有人可以帮我解释一下如何运行SIMPER吗?

感谢您的时间,

SEAN

0 个答案:

没有答案