创建一个三角形相关矩阵风格的图,用于物种两两比较。

huangapple go评论87阅读模式
英文:

Creating a Triangle Corrlation Matrix Style plot for Species Pairwise comparison

问题

我已经进行了一系列的两两卡方检验,得到了每对物种的p值数据框。我想使用ggplot创建一种类似于相关矩阵的可视化,以便我们可以看到哪些物种对具有显著的p值。对于大于0.05的值使用一种颜色,对于小于或等于0.05的值使用另一种颜色。类似于这个示例:(https://www.researchgate.net/publication/293654442_cooccur_Probabilistic_Species_Co-Occurrence_Analysis_in_R)。

我已经尝试了以下这些指南:

但没有太大的成功。我在以下两个方面遇到了问题:1)将其放入三角形中,2)将颜色设为二进制而不是渐变色。我希望保持物种的顺序与数据框中的顺序相同。任何建议都将非常有帮助。我一直在为此而烦恼。

我已经附上了数据框的dputs,分别是宽格式(Wide.df)和长格式(long.df)的数据。

英文:

I have been doing a series of pairwise chi-squared comparisons of species, and have a data frame with the p_values for each species pair. I would like to create a visualization using ggplot similar to a correlation matrix so we can see what species pairs have significant p-values. With values >.05 in one color and values < or = 0.5 in another. Something similar to this: (https://www.researchgate.net/publication/293654442_cooccur_Probabilistic_Species_Co-Occurrence_Analysis_in_R)

创建一个三角形相关矩阵风格的图,用于物种两两比较。

I have tried following these guide:

http://www.sthda.com/english/wiki/ggplot2-quick-correlation-matrix-heatmap-r-software-and-data-visualization

https://www.youtube.com/watch?v=E3De2A73ako

Without much success. I am having trouble 1) getting it into a triangle and 2) having the colors be binary rather than a gradient. I would prefer to maintain the order of the species as I have them in my data frames. Any advice would be amazing. I have been driving myself bandannas with this one.

I have attached dputs of data frames both in wide and long formats!

Thanks very much!

Wide.df:

structure(list(Species1 = c(NA, 8.29661485364936e-14, 0.197328035330918, 
3.73447143215061e-05, 0.0200245227839388, 0.000158518795659732, 
0.999999999999999, 0.999999999999999, 0.200661174254572, 0.0259711510883781, 
0.624415639985824, 0.999999999999995, 0.999999999999991), Species2 = c(8.29661485364936e-14, 
NA, 0.911548596172133, 0.0808672833723648, 0.00232408080140171, 
0.00257625010714883, 0.999999999999777, 0.999999999999777, 0.789829339795786, 
0.198077829941541, 0.768466049890891, 0.999999999999885, 0.999999999999994
), Species3 = c(0.197328035330918, 0.911548596172133, NA, 0.181696316252709, 
0.575238254258972, 0.939866701307512, 0.999999999999999, 0.999999999999999, 
0.999999999999999, 0.507611967012476, 0.673527222144056, 0.999999999999996, 
1), Species4 = c(3.73447143215061e-05, 0.0808672833723648, 0.181696316252709, 
NA, 1.40996305374498e-10, 0.405410680293625, 0.999999999999999, 
0.999999999999999, 1.56797538624063e-08, 8.50447159522988e-05, 
0.00644405295214749, 0.88381428087806, 0.99999999999993), Species5 = c(0.0200245227839388, 
0.00232408080140171, 0.575238254258972, 1.40996305374498e-10, 
NA, 0.622095128306733, 0.999999999999959, 0.999999999999959, 
0.000115476294641169, 1.60499061530966e-19, 4.67520836455185e-05, 
0.528580893876124, 0.795044191844885), Species6 = c(0.000158518795659732, 
0.00257625010714883, 0.939866701307512, 0.405410680293625, 0.622095128306733, 
NA, 0.999999999999999, 0.999999999999999, 0.200661174254572, 
0.410636112084533, 0.999999999999929, 0.999999999999995, 0.999999999999991
), Species7 = c(0.999999999999999, 0.999999999999777, 0.999999999999999, 
0.999999999999999, 0.999999999999959, 0.999999999999999, NA, 
0.999999999999299, 0.779426832974571, 0.999999999999933, 0.999999999999999, 
0.999999999999998, 0.999999999999687), Species8 = c(0.999999999999999, 
0.999999999999777, 0.999999999999999, 0.999999999999999, 0.999999999999959, 
0.999999999999999, 0.999999999999299, NA, 0.999999999999999, 
0.611136265859179, 0.999999999999999, 0.999999999999998, 0.999999999999687
), Species9 = c(0.200661174254572, 0.789829339795786, 0.999999999999999, 
1.56797538624063e-08, 0.000115476294641169, 0.200661174254572, 
0.779426832974571, 0.999999999999999, NA, 0.0311037604732729, 
0.0122054515551129, 0.999999999999984, 0.999999999999999), Species10 = c(0.0259711510883781, 
0.198077829941541, 0.507611967012476, 8.50447159522988e-05, 1.60499061530966e-19, 
0.410636112084533, 0.999999999999933, 0.611136265859179, 0.0311037604732729, 
NA, 0.0403275386741277, 0.508244635418544, 0.999999999999999), 
    Species11 = c(0.624415639985824, 0.768466049890891, 0.673527222144056, 
    0.00644405295214749, 4.67520836455185e-05, 0.999999999999929, 
    0.999999999999999, 0.999999999999999, 0.0122054515551129, 
    0.0403275386741277, NA, 1, 0.999999999999823), Species12 = c(0.999999999999995, 
    0.999999999999885, 0.999999999999996, 0.88381428087806, 0.528580893876124, 
    0.999999999999995, 0.999999999999998, 0.999999999999998, 
    0.999999999999984, 0.508244635418544, 1, NA, 0.999999999998991
    ), Species13 = c(0.999999999999991, 0.999999999999994, 1, 
    0.99999999999993, 0.795044191844885, 0.999999999999991, 0.999999999999687, 
    0.999999999999687, 0.999999999999999, 0.999999999999999, 
    0.999999999999823, 0.999999999998991, NA)), row.names = c(&quot;Species1&quot;, 
&quot;Species2&quot;, &quot;Species3&quot;, &quot;Species4&quot;, &quot;Species5&quot;, &quot;Species6&quot;, &quot;Species7&quot;, 
&quot;Species8&quot;, &quot;Species9&quot;, &quot;Species10&quot;, &quot;Species11&quot;, &quot;Species12&quot;, 
&quot;Species13&quot;), class = &quot;data.frame&quot;)

long.df:

structure(list(SpeciesA = c(&quot;Species1&quot;, &quot;Species2&quot;, &quot;Species3&quot;, 
&quot;Species4&quot;, &quot;Species5&quot;, &quot;Species6&quot;, &quot;Species7&quot;, &quot;Species8&quot;, &quot;Species9&quot;, 
&quot;Species10&quot;, &quot;Species11&quot;, &quot;Species12&quot;, &quot;Species13&quot;, &quot;Species1&quot;, 
&quot;Species2&quot;, &quot;Species3&quot;, &quot;Species4&quot;, &quot;Species5&quot;, &quot;Species6&quot;, &quot;Species7&quot;, 
&quot;Species8&quot;, &quot;Species9&quot;, &quot;Species10&quot;, &quot;Species11&quot;, &quot;Species12&quot;, 
&quot;Species13&quot;, &quot;Species1&quot;, &quot;Species2&quot;, &quot;Species3&quot;, &quot;Species4&quot;, 
&quot;Species5&quot;, &quot;Species6&quot;, &quot;Species7&quot;, &quot;Species8&quot;, &quot;Species9&quot;, &quot;Species10&quot;, 
&quot;Species11&quot;, &quot;Species12&quot;, &quot;Species13&quot;, &quot;Species1&quot;, &quot;Species2&quot;, 
&quot;Species3&quot;, &quot;Species4&quot;, &quot;Species5&quot;, &quot;Species6&quot;, &quot;Species7&quot;, &quot;Species8&quot;, 
&quot;Species9&quot;, &quot;Species10&quot;, &quot;Species11&quot;, &quot;Species12&quot;, &quot;Species13&quot;, 
&quot;Species1&quot;, &quot;Species2&quot;, &quot;Species3&quot;, &quot;Species4&quot;, &quot;Species5&quot;, &quot;Species6&quot;, 
&quot;Species7&quot;, &quot;Species8&quot;, &quot;Species9&quot;, &quot;Species10&quot;, &quot;Species11&quot;, 
&quot;Species12&quot;, &quot;Species13&quot;, &quot;Species1&quot;, &quot;Species2&quot;, &quot;Species3&quot;, 
&quot;Species4&quot;, &quot;Species5&quot;, &quot;Species6&quot;, &quot;Species7&quot;, &quot;Species8&quot;, &quot;Species9&quot;, 
&quot;Species10&quot;, &quot;Species11&quot;, &quot;Species12&quot;, &quot;Species13&quot;, &quot;Species1&quot;, 
&quot;Species2&quot;, &quot;Species3&quot;, &quot;Species4&quot;, &quot;Species5&quot;, &quot;Species6&quot;, &quot;Species7&quot;, 
&quot;Species8&quot;, &quot;Species9&quot;, &quot;Species10&quot;, &quot;Species11&quot;, &quot;Species12&quot;, 
&quot;Species13&quot;, &quot;Species1&quot;, &quot;Species2&quot;, &quot;Species3&quot;, &quot;Species4&quot;, 
&quot;Species5&quot;, &quot;Species6&quot;, &quot;Species7&quot;, &quot;Species8&quot;, &quot;Species9&quot;, &quot;Species10&quot;, 
&quot;Species11&quot;, &quot;Species12&quot;, &quot;Species13&quot;, &quot;Species1&quot;, &quot;Species2&quot;, 
&quot;Species3&quot;, &quot;Species4&quot;, &quot;Species5&quot;, &quot;Species6&quot;, &quot;Species7&quot;, &quot;Species8&quot;, 
&quot;Species9&quot;, &quot;Species10&quot;, &quot;Species11&quot;, &quot;Species12&quot;, &quot;Species13&quot;, 
&quot;Species1&quot;, &quot;Species2&quot;, &quot;Species3&quot;, &quot;Species4&quot;, &quot;Species5&quot;, &quot;Species6&quot;, 
&quot;Species7&quot;, &quot;Species8&quot;, &quot;Species9&quot;, &quot;Species10&quot;, &quot;Species11&quot;, 
&quot;Species12&quot;, &quot;Species13&quot;, &quot;Species1&quot;, &quot;Species2&quot;, &quot;Species3&quot;, 
&quot;Species4&quot;, &quot;Species5&quot;, &quot;Species6&quot;, &quot;Species7&quot;, &quot;Species8&quot;, &quot;Species9&quot;, 
&quot;Species10&quot;, &quot;Species11&quot;, &quot;Species12&quot;, &quot;Species13&quot;, &quot;Species1&quot;, 
&quot;Species2&quot;, &quot;Species3&quot;, &quot;Species4&quot;, &quot;Species5&quot;, &quot;Species6&quot;, &quot;Species7&quot;, 
&quot;Species8&quot;, &quot;Species9&quot;, &quot;Species10&quot;, &quot;Species11&quot;, &quot;Species12&quot;, 
&quot;Species13&quot;, &quot;Species1&quot;, &quot;Species2&quot;, &quot;Species3&quot;, &quot;Species4&quot;, 
&quot;Species5&quot;, &quot;Species6&quot;, &quot;Species7&quot;, &quot;Species8&quot;, &quot;Species9&quot;, &quot;Species10&quot;, 
&quot;Species11&quot;, &quot;Species12&quot;, &quot;Species13&quot;), SpeciesB = structure(c(1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 
4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 
6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 
7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 
8L, 8L, 8L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 
9L, 9L, 9L, 9L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 
10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 
11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 
12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 
13L, 13L, 13L, 13L), .Label = c(&quot;Species1&quot;, &quot;Species2&quot;, &quot;Species3&quot;, 
&quot;Species4&quot;, &quot;Species5&quot;, &quot;Species6&quot;, &quot;Species7&quot;, &quot;Species8&quot;, &quot;Species9&quot;, 
&quot;Species10&quot;, &quot;Species11&quot;, &quot;Species12&quot;, &quot;Species13&quot;), class = &quot;factor&quot;), 
p_value = c(NA, 8.29661485364936e-14, 0.197328035330918, 
3.73447143215061e-05, 0.0200245227839388, 0.000158518795659732, 
0.999999999999999, 0.999999999999999, 0.200661174254572, 
0.0259711510883781, 0.624415639985824, 0.999999999999995, 
0.999999999999991, 8.29661485364936e-14, NA, 0.911548596172133, 
0.0808672833723648, 0.00232408080140171, 0.00257625010714883, 
0.999999999999777, 0.999999999999777, 0.789829339795786, 
0.198077829941541, 0.768466049890891, 0.999999999999885, 
0.999999999999994, 0.197328035330918, 0.911548596172133, 
NA, 0.181696316252709, 0.575238254258972, 0.939866701307512, 
0.999999999999999, 0.999999999999999, 0.999999999999999, 
0.507611967012476, 0.673527222144056, 0.999999999999996, 
1, 3.73447143215061e-05, 0.0808672833723648, 0.181696316252709, 
NA, 1.40996305374498e-10, 0.405410680293625, 0.999999999999999, 
0.999999999999999, 1.56797538624063e-08, 8.50447159522988e-05, 
0.00644405295214749, 0.88381428087806, 0.99999999999993, 
0.0200245227839388, 0.00232408080140171, 0.575238254258972, 
1.40996305374498e-10, NA, 0.622095128306733, 0.999999999999959, 
0.999999999999959, 0.000115476294641169, 1.60499061530966e-19, 
4.67520836455185e-05, 0.528580893876124, 0.795044191844885, 
0.000158518795659732, 0.00257625010714883, 0.939866701307512, 
0.405410680293625, 0.622095128306733, NA, 0.999999999999999, 
0.999999999999999, 0.200661174254572, 0.410636112084533, 
0.999999999999929, 0.999999999999995, 0.999999999999991, 
0.999999999999999, 0.999999999999777, 0.999999999999999, 
0.999999999999999, 0.999999999999959, 0.999999999999999, 
NA, 0.999999999999299, 0.779426832974571, 0.999999999999933, 
0.999999999999999, 0.999999999999998, 0.999999999999687, 
0.999999999999999, 0.999999999999777, 0.999999999999999, 
0.999999999999999, 0.999999999999959, 0.999999999999999, 
0.999999999999299, NA, 0.999999999999999, 0.611136265859179, 
0.999999999999999, 0.999999999999998, 0.999999999999687, 
0.200661174254572, 0.789829339795786, 0.999999999999999, 
1.56797538624063e-08, 0.000115476294641169, 0.200661174254572, 
0.779426832974571, 0.999999999999999, NA, 0.0311037604732729, 
0.0122054515551129, 0.999999999999984, 0.999999999999999, 
0.0259711510883781, 0.198077829941541, 0.507611967012476, 
8.50447159522988e-05, 1.60499061530966e-19, 0.410636112084533, 
0.999999999999933, 0.611136265859179, 0.0311037604732729, 
NA, 0.0403275386741277, 0.508244635418544, 0.999999999999999, 
0.624415639985824, 0.768466049890891, 0.673527222144056, 
0.00644405295214749, 4.67520836455185e-05, 0.999999999999929, 
0.999999999999999, 0.999999999999999, 0.0122054515551129, 
0.0403275386741277, NA, 1, 0.999999999999823, 0.999999999999995, 
0.999999999999885, 0.999999999999996, 0.88381428087806, 0.528580893876124, 
0.999999999999995, 0.999999999999998, 0.999999999999998, 
0.999999999999984, 0.508244635418544, 1, NA, 0.999999999998991, 
0.999999999999991, 0.999999999999994, 1, 0.99999999999993, 
0.795044191844885, 0.999999999999991, 0.999999999999687, 
0.999999999999687, 0.999999999999999, 0.999999999999999, 
0.999999999999823, 0.999999999998991, NA)), row.names = c(NA, 
-169L), class = &quot;data.frame&quot;)

答案1

得分: 1

以下是翻译好的部分:

  • 使用 cut 将数据分组成简单的分组热图,但需要经过几个阶段:

  • 使用 cut 对数据进行分组;我随意将它们分成了0、0.25、0.5和1的分组,您可以根据自己的需要自由更改这些数字;

  • 为了根据类似数字排序的方式保留物种的顺序,我们需要将它们转换为 factor,为了正确排序它们,我们需要解析出数字,因此需要使用 as.integer(gsub(..)) 然后稍后使用 factor

  • 为了获得半三角形,我确保 x 轴上的 num* 值大于 y 轴上的值;这是任意的,但与您的示例图匹配。

  • 为了在对角线上显示标签,我们保留了进入 ggplot(.) 的数据中的 numA == numB,然后将对角线用于瓷砖,然后仅保留标签的对角线部分(geom_text)。

  • 为了扩展画布以容纳对角线的标签,我们需要同时使用 expand= 扩展两个轴;实际的数字可能取决于画布(pdf、html等)。

我使用了基本的 R(R-4)转换/子集,这很容易转换为使用 dplyr 的 mutate/filter

创建一个三角形相关矩阵风格的图,用于物种两两比较。

英文:

Here's a crude start. The basic plot is a simple binned heatmap, but there are several stages we need to go through:

  • bin the data with cut; I arbitrarily cut them into bins of 0, 0.25, 0.5, and 1, feel free to change the numbers for your own purpose;
  • to preserve order based on the numeric-like sorting of the species, we need to convert them to factors, and to order them right we need to parse out the numbers, ergo the as.integer(gsub(..)) then factor later.
  • to get a half-triangle, I make sure that the x-axis num* value is greater than the y-axis; this is arbitrary but matched your sample plot.
  • in order to show the labels on the diagonal, though, we keep numA == numB in the data that goes into ggplot(.), subset out the diagonal for the tiles, then keep only the diagonal for the labels (geom_text).
  • to expand the canvas a little to allow for the diagonal's labels, we need to expand= both axes; the actual numbers may depend on the canvas (pdf, html, etc).

I used base-R (R-4) transform/subset, this is easily converted to use dplyr's mutate/filter.

long.df |&gt;
  transform(
    bin = cut(p_value, c(0, 0.25, 0.5, 1), labels = c(&quot;low&quot;, &quot;moderate&quot;, &quot;high&quot;)),
    numA = as.integer(gsub(&quot;\\D&quot;, &quot;&quot;, SpeciesA)),
    numB = as.integer(gsub(&quot;\\D&quot;, &quot;&quot;, SpeciesB))
  ) |&gt; transform(
    SpeciesA = factor(SpeciesA, levels = unique(SpeciesA[order(numA)])),
    SpeciesB = factor(SpeciesB, levels = unique(SpeciesB[order(numB)]))
  ) |&gt;
  subset(numA &gt;= numB) |&gt;
  ggplot(aes(SpeciesA, SpeciesB)) +
  geom_tile(aes(fill = bin), data = ~ subset(., numA &gt; numB)) +
  geom_text(aes(label = SpeciesA), data = ~ subset(., numA == numB),
            hjust = 1.1, angle = -30) +
  scale_x_discrete(name = NULL, expand = expansion(0, c(2.5, 0)), drop = FALSE) +
  scale_y_discrete(name = NULL, expand = expansion(0, c(0, 2)), drop = FALSE) +
  theme(
    axis.text = element_blank(),
    axis.line = element_blank(),
    axis.ticks = element_blank()
  )

创建一个三角形相关矩阵风格的图,用于物种两两比较。

答案2

得分: 1

这段代码是使用r2evans的帮助解决的!我最终使用的代码如下:

test.plot1 <- long.df1 %>%
  mutate(
    color = ifelse(test = p_value > 0.05,
                   yes = "#440154FF",
                   no = (ifelse(test = p_value <= 0.05,
                                yes = "#FDE725FF",
                                no = NA)
                )
    )
  ) %>%
  mutate(
    Species1 = factor(Species1, levels = unique(Species1[order(order_species1)])),
    Species2 = factor(Species2, levels = unique(Species2[order(order_species2)]))
  ) %>%
  subset(order_species1 >= order_species2) %>%
  ggplot(aes(Species1, Species2)) +
  geom_tile(aes(fill = color), data = ~ subset(., order_species1 > order_species2), color = "white") +
  geom_text(aes(label = Species1), data = ~ subset(., order_species1 == order_species2),
            hjust = 1.1, angle = -30) +
  scale_x_discrete(name = NULL, expand = expansion(0, c(2.5, 0)), drop = FALSE) +
  scale_y_discrete(name = NULL, expand = expansion(0, c(0, 2)), drop = FALSE) + 
  theme_minimal() +
  theme(
    axis.text = element_blank(),
    axis.line = element_blank(),
    axis.ticks = element_blank(),
    panel.grid = element_blank()
  ) + scale_fill_identity()

test.plot1

这段代码生成了上述图片中的图表。

英文:

Solved with the help of r2evans! The code I ended up using is below!

test.plot1 &lt;- long.df1 %&gt;%
mutate(
color = # get colors of graphs
ifelse(test = p_value &gt; 0.05,
yes = &quot;#440154FF&quot;,
no = (ifelse(test = p_value &lt;= 0.05,
yes = &quot;#FDE725FF&quot;,
no = NA)
)
)
) %&gt;% 
mutate(
Species1 = factor(Species1, levels = unique(Species1[order(order_species1)])),
Species2 = factor(Species2 , levels = unique(Species2 [order(order_species2)]))
) %&gt;% 
subset(order_species1&gt;=order_species2) %&gt;% 
ggplot(aes(Species1, Species2)) +
geom_tile(aes(fill = color), data = ~ subset(., order_species1&gt; order_species2), color = &quot;white&quot;) +
geom_text(aes(label = Species1), data = ~ subset(., order_species1 == order_species2),
hjust = 1.1, angle = -30) +
scale_x_discrete(name = NULL, expand = expansion(0, c(2.5, 0)), drop = FALSE) +
scale_y_discrete(name = NULL, expand = expansion(0, c(0, 2)), drop = FALSE) + 
theme_minimal() +
theme(
axis.text = element_blank(),
axis.line = element_blank(),
axis.ticks = element_blank(),
panel.grid = element_blank()
) +   scale_fill_identity() 
test.plot1

That produces this plot:
创建一个三角形相关矩阵风格的图,用于物种两两比较。

Thanks all!

Dput for data frame is here:

structure(list(Species1 = c(&quot;SpeciesA&quot;, &quot;SpeciesB&quot;, &quot;SpeciesC&quot;, 
&quot;SpeciesD&quot;, &quot;SpeciesE&quot;, &quot;SpeciesF&quot;, &quot;SpeciesG&quot;, &quot;SpeciesH&quot;, &quot;SpeciesI&quot;, 
&quot;SpeciesJ&quot;, &quot;SpeciesK&quot;, &quot;SpeciesL&quot;, &quot;SpeciesM&quot;, &quot;SpeciesA&quot;, &quot;SpeciesB&quot;, 
&quot;SpeciesC&quot;, &quot;SpeciesD&quot;, &quot;SpeciesE&quot;, &quot;SpeciesF&quot;, &quot;SpeciesG&quot;, &quot;SpeciesH&quot;, 
&quot;SpeciesI&quot;, &quot;SpeciesJ&quot;, &quot;SpeciesK&quot;, &quot;SpeciesL&quot;, &quot;SpeciesM&quot;, &quot;SpeciesA&quot;, 
&quot;SpeciesB&quot;, &quot;SpeciesC&quot;, &quot;SpeciesD&quot;, &quot;SpeciesE&quot;, &quot;SpeciesF&quot;, &quot;SpeciesG&quot;, 
&quot;SpeciesH&quot;, &quot;SpeciesI&quot;, &quot;SpeciesJ&quot;, &quot;SpeciesK&quot;, &quot;SpeciesL&quot;, &quot;SpeciesM&quot;, 
&quot;SpeciesA&quot;, &quot;SpeciesB&quot;, &quot;SpeciesC&quot;, &quot;SpeciesD&quot;, &quot;SpeciesE&quot;, &quot;SpeciesF&quot;, 
&quot;SpeciesG&quot;, &quot;SpeciesH&quot;, &quot;SpeciesI&quot;, &quot;SpeciesJ&quot;, &quot;SpeciesK&quot;, &quot;SpeciesL&quot;, 
&quot;SpeciesM&quot;, &quot;SpeciesA&quot;, &quot;SpeciesB&quot;, &quot;SpeciesC&quot;, &quot;SpeciesD&quot;, &quot;SpeciesE&quot;, 
&quot;SpeciesF&quot;, &quot;SpeciesG&quot;, &quot;SpeciesH&quot;, &quot;SpeciesI&quot;, &quot;SpeciesJ&quot;, &quot;SpeciesK&quot;, 
&quot;SpeciesL&quot;, &quot;SpeciesM&quot;, &quot;SpeciesA&quot;, &quot;SpeciesB&quot;, &quot;SpeciesC&quot;, &quot;SpeciesD&quot;, 
&quot;SpeciesE&quot;, &quot;SpeciesF&quot;, &quot;SpeciesG&quot;, &quot;SpeciesH&quot;, &quot;SpeciesI&quot;, &quot;SpeciesJ&quot;, 
&quot;SpeciesK&quot;, &quot;SpeciesL&quot;, &quot;SpeciesM&quot;, &quot;SpeciesA&quot;, &quot;SpeciesB&quot;, &quot;SpeciesC&quot;, 
&quot;SpeciesD&quot;, &quot;SpeciesE&quot;, &quot;SpeciesF&quot;, &quot;SpeciesG&quot;, &quot;SpeciesH&quot;, &quot;SpeciesI&quot;, 
&quot;SpeciesJ&quot;, &quot;SpeciesK&quot;, &quot;SpeciesL&quot;, &quot;SpeciesM&quot;, &quot;SpeciesA&quot;, &quot;SpeciesB&quot;, 
&quot;SpeciesC&quot;, &quot;SpeciesD&quot;, &quot;SpeciesE&quot;, &quot;SpeciesF&quot;, &quot;SpeciesG&quot;, &quot;SpeciesH&quot;, 
&quot;SpeciesI&quot;, &quot;SpeciesJ&quot;, &quot;SpeciesK&quot;, &quot;SpeciesL&quot;, &quot;SpeciesM&quot;, &quot;SpeciesA&quot;, 
&quot;SpeciesB&quot;, &quot;SpeciesC&quot;, &quot;SpeciesD&quot;, &quot;SpeciesE&quot;, &quot;SpeciesF&quot;, &quot;SpeciesG&quot;, 
&quot;SpeciesH&quot;, &quot;SpeciesI&quot;, &quot;SpeciesJ&quot;, &quot;SpeciesK&quot;, &quot;SpeciesL&quot;, &quot;SpeciesM&quot;, 
&quot;SpeciesA&quot;, &quot;SpeciesB&quot;, &quot;SpeciesC&quot;, &quot;SpeciesD&quot;, &quot;SpeciesE&quot;, &quot;SpeciesF&quot;, 
&quot;SpeciesG&quot;, &quot;SpeciesH&quot;, &quot;SpeciesI&quot;, &quot;SpeciesJ&quot;, &quot;SpeciesK&quot;, &quot;SpeciesL&quot;, 
&quot;SpeciesM&quot;, &quot;SpeciesA&quot;, &quot;SpeciesB&quot;, &quot;SpeciesC&quot;, &quot;SpeciesD&quot;, &quot;SpeciesE&quot;, 
&quot;SpeciesF&quot;, &quot;SpeciesG&quot;, &quot;SpeciesH&quot;, &quot;SpeciesI&quot;, &quot;SpeciesJ&quot;, &quot;SpeciesK&quot;, 
&quot;SpeciesL&quot;, &quot;SpeciesM&quot;, &quot;SpeciesA&quot;, &quot;SpeciesB&quot;, &quot;SpeciesC&quot;, &quot;SpeciesD&quot;, 
&quot;SpeciesE&quot;, &quot;SpeciesF&quot;, &quot;SpeciesG&quot;, &quot;SpeciesH&quot;, &quot;SpeciesI&quot;, &quot;SpeciesJ&quot;, 
&quot;SpeciesK&quot;, &quot;SpeciesL&quot;, &quot;SpeciesM&quot;, &quot;SpeciesA&quot;, &quot;SpeciesB&quot;, &quot;SpeciesC&quot;, 
&quot;SpeciesD&quot;, &quot;SpeciesE&quot;, &quot;SpeciesF&quot;, &quot;SpeciesG&quot;, &quot;SpeciesH&quot;, &quot;SpeciesI&quot;, 
&quot;SpeciesJ&quot;, &quot;SpeciesK&quot;, &quot;SpeciesL&quot;, &quot;SpeciesM&quot;), Species2 = structure(c(1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 
4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 
6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 
7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 
8L, 8L, 8L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 
9L, 9L, 9L, 9L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 
10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 
11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 
12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 
13L, 13L, 13L, 13L), .Label = c(&quot;SpeciesA&quot;, &quot;SpeciesB&quot;, &quot;SpeciesC&quot;, 
&quot;SpeciesD&quot;, &quot;SpeciesE&quot;, &quot;SpeciesF&quot;, &quot;SpeciesG&quot;, &quot;SpeciesH&quot;, &quot;SpeciesI&quot;, 
&quot;SpeciesJ&quot;, &quot;SpeciesK&quot;, &quot;SpeciesL&quot;, &quot;SpeciesM&quot;), class = &quot;factor&quot;), 
p_value = c(NA, 8.29661485364936e-14, 0.197328035330918, 
3.73447143215061e-05, 0.0200245227839388, 0.000158518795659732, 
0.999999999999999, 0.999999999999999, 0.200661174254572, 
0.0259711510883781, 0.624415639985824, 0.999999999999995, 
0.999999999999991, 8.29661485364936e-14, NA, 0.911548596172133, 
0.0808672833723648, 0.00232408080140171, 0.00257625010714883, 
0.999999999999777, 0.999999999999777, 0.789829339795786, 
0.198077829941541, 0.768466049890891, 0.999999999999885, 
0.999999999999994, 0.197328035330918, 0.911548596172133, 
NA, 0.181696316252709, 0.575238254258972, 0.939866701307512, 
0.999999999999999, 0.999999999999999, 0.999999999999999, 
0.507611967012476, 0.673527222144056, 0.999999999999996, 
1, 3.73447143215061e-05, 0.0808672833723648, 0.181696316252709, 
NA, 1.40996305374498e-10, 0.405410680293625, 0.999999999999999, 
0.999999999999999, 1.56797538624063e-08, 8.50447159522988e-05, 
0.00644405295214749, 0.88381428087806, 0.99999999999993, 
0.0200245227839388, 0.00232408080140171, 0.575238254258972, 
1.40996305374498e-10, NA, 0.622095128306733, 0.999999999999959, 
0.999999999999959, 0.000115476294641169, 1.60499061530966e-19, 
4.67520836455185e-05, 0.528580893876124, 0.795044191844885, 
0.000158518795659732, 0.00257625010714883, 0.939866701307512, 
0.405410680293625, 0.622095128306733, NA, 0.999999999999999, 
0.999999999999999, 0.200661174254572, 0.410636112084533, 
0.999999999999929, 0.999999999999995, 0.999999999999991, 
0.999999999999999, 0.999999999999777, 0.999999999999999, 
0.999999999999999, 0.999999999999959, 0.999999999999999, 
NA, 0.999999999999299, 0.779426832974571, 0.999999999999933, 
0.999999999999999, 0.999999999999998, 0.999999999999687, 
0.999999999999999, 0.999999999999777, 0.999999999999999, 
0.999999999999999, 0.999999999999959, 0.999999999999999, 
0.999999999999299, NA, 0.999999999999999, 0.611136265859179, 
0.999999999999999, 0.999999999999998, 0.999999999999687, 
0.200661174254572, 0.789829339795786, 0.999999999999999, 
1.56797538624063e-08, 0.000115476294641169, 0.200661174254572, 
0.779426832974571, 0.999999999999999, NA, 0.0311037604732729, 
0.0122054515551129, 0.999999999999984, 0.999999999999999, 
0.0259711510883781, 0.198077829941541, 0.507611967012476, 
8.50447159522988e-05, 1.60499061530966e-19, 0.410636112084533, 
0.999999999999933, 0.611136265859179, 0.0311037604732729, 
NA, 0.0403275386741277, 0.508244635418544, 0.999999999999999, 
0.624415639985824, 0.768466049890891, 0.673527222144056, 
0.00644405295214749, 4.67520836455185e-05, 0.999999999999929, 
0.999999999999999, 0.999999999999999, 0.0122054515551129, 
0.0403275386741277, NA, 1, 0.999999999999823, 0.999999999999995, 
0.999999999999885, 0.999999999999996, 0.88381428087806, 0.528580893876124, 
0.999999999999995, 0.999999999999998, 0.999999999999998, 
0.999999999999984, 0.508244635418544, 1, NA, 0.999999999998991, 
0.999999999999991, 0.999999999999994, 1, 0.99999999999993, 
0.795044191844885, 0.999999999999991, 0.999999999999687, 
0.999999999999687, 0.999999999999999, 0.999999999999999, 
0.999999999999823, 0.999999999998991, NA), order_species1 = c(1L, 
2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 1L, 2L, 
3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 1L, 2L, 3L, 
4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 1L, 2L, 3L, 4L, 
5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 1L, 2L, 3L, 4L, 5L, 
6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 1L, 2L, 3L, 4L, 5L, 6L, 
7L, 8L, 9L, 10L, 11L, 12L, 13L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 
8L, 9L, 10L, 11L, 12L, 13L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 
9L, 10L, 11L, 12L, 13L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 
10L, 11L, 12L, 13L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 
11L, 12L, 13L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 
12L, 13L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 
13L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L
), order_species2 = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 
6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, 7L, 
7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 
8L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 
9L, 9L, 9L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 
10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 
11L, 11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 
12L, 12L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L, 13L, 
13L, 13L, 13L, 13L, 13L, 13L, 13L)), row.names = c(NA, -169L
), class = &quot;data.frame&quot;)

huangapple
  • 本文由 发表于 2023年2月18日 11:35:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/75491011.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定