knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE)
library(tidyverse)
library(readxl)
library(vegan)
df <- read_xlsx("Однодольные_для_перманова.xlsx") %>%
select(-Семейство, -Вид)
dist1a <- vegdist(df[,2:13], method = "euclidean")
adonis(dist1a ~ Fam, data = df, permutations = 9999)
##
## Call:
## adonis(formula = dist1a ~ Fam, data = df, permutations = 9999)
##
## Permutation: free
## Number of permutations: 9999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## Fam 3 489.98 163.326 104.87 0.84661 1e-04 ***
## Residuals 57 88.77 1.557 0.15339
## Total 60 578.75 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
dist1b <- filter(df, Fam %in% c("Iri", "Poa"))[,2:13]
dist1b <- vegdist(dist1b, method = "euclidean")
adonis(dist1b ~ Fam,
data = filter(df, Fam %in% c("Iri", "Poa")),
permutations = 9999)
##
## Call:
## adonis(formula = dist1b ~ Fam, data = filter(df, Fam %in% c("Iri", "Poa")), permutations = 9999)
##
## Permutation: free
## Number of permutations: 9999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## Fam 1 22.338 22.3381 16.761 0.44388 1e-04 ***
## Residuals 21 27.987 1.3327 0.55612
## Total 22 50.325 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
dist2a <- df %>% select(D, L_RH) %>%
vegdist(method = "euclidean")
adonis(dist2a ~ Fam, data = df, permutations = 9999)
##
## Call:
## adonis(formula = dist2a ~ Fam, data = df, permutations = 9999)
##
## Permutation: free
## Number of permutations: 9999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## Fam 3 107.251 35.750 207.53 0.91613 1e-04 ***
## Residuals 57 9.819 0.172 0.08387
## Total 60 117.070 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(df, aes(x = D, y = L_RH, color = Fam)) +
geom_point() +
scale_color_manual(values = c("green", "steelblue2", "plum1", "yellow1")) +
stat_ellipse()+
theme_classic() +
theme(legend.position = "bottom")
dist2b <- df %>%
filter(Fam %in% c("Iri", "Poa")) %>%
select(D, L_RH) %>%
vegdist(method = "euclidean")
adonis(dist2b ~ Fam,
data = filter(df, Fam %in% c("Iri", "Poa")),
permutations = 9999)
##
## Call:
## adonis(formula = dist2b ~ Fam, data = filter(df, Fam %in% c("Iri", "Poa")), permutations = 9999)
##
## Permutation: free
## Number of permutations: 9999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## Fam 1 4.1122 4.1122 15.388 0.42289 3e-04 ***
## Residuals 21 5.6119 0.2672 0.57711
## Total 22 9.7241 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(filter(df, Fam %in% c("Iri", "Poa")), aes(x = D, y = L_RH, color = Fam)) +
geom_point() +
scale_color_manual(values = c("steelblue2", "yellow1")) +
stat_ellipse()+
theme_classic() +
theme(legend.position = "bottom")
dist3a <- df %>% select(F_размер, F_другое) %>%
vegdist(method = "euclidean")
adonis(dist3a ~ Fam, data = df, permutations = 9999)
##
## Call:
## adonis(formula = dist3a ~ Fam, data = df, permutations = 9999)
##
## Permutation: free
## Number of permutations: 9999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## Fam 3 101.451 33.817 103.92 0.84542 1e-04 ***
## Residuals 57 18.549 0.325 0.15458
## Total 60 120.000 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(df, aes(x = F_размер, F_другое, color = Fam)) +
geom_point() +
scale_color_manual(values = c("green", "steelblue2", "plum1", "yellow1")) +
stat_ellipse()+
theme_classic() +
theme(legend.position = "bottom")
dist3b <- df %>%
filter(Fam %in% c("Iri", "Poa")) %>%
select(F_размер, F_другое) %>%
vegdist(method = "euclidean")
adonis(dist3b ~ Fam,
data = filter(df, Fam %in% c("Iri","Poa")),
permutations = 9999)
##
## Call:
## adonis(formula = dist3b ~ Fam, data = filter(df, Fam %in% c("Iri", "Poa")), permutations = 9999)
##
## Permutation: free
## Number of permutations: 9999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## Fam 1 2.1558 2.15577 5.8602 0.21817 0.0106 *
## Residuals 21 7.7252 0.36787 0.78183
## Total 22 9.8810 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(filter(df, Fam %in% c("Iri","Poa")), aes(x = F_размер, y = F_другое, color = Fam)) +
geom_point() +
scale_color_manual(values = c("steelblue2", "yellow1")) +
stat_ellipse()+
theme_classic() +
theme(legend.position = "bottom")