Data was subseted in Excel for convenience, all pond and creek measurements were put together on separate sheets in excel:
library(readxl)
Pond_data_ <- read_excel("Pond data .xlsx")
Pond_WQ<- Pond_data_
summary(Pond_data_)
## Week Date Site Reading
## Min. :1.00 Length:6 Length:6 Min. :1.0
## 1st Qu.:1.25 Class :character Class :character 1st Qu.:1.0
## Median :2.00 Mode :character Mode :character Median :1.5
## Mean :2.00 Mean :1.5
## 3rd Qu.:2.75 3rd Qu.:2.0
## Max. :3.00 Max. :2.0
## ËšC DO% DO mg/L SPC (Conductivity)
## Min. :13.10 Min. : 8.80 Min. :0.930 Min. :101.4
## 1st Qu.:13.20 1st Qu.:10.00 1st Qu.:1.025 1st Qu.:102.7
## Median :13.55 Median :13.65 Median :1.255 Median :103.8
## Mean :14.13 Mean :13.65 Mean :1.348 Mean :107.8
## 3rd Qu.:14.95 3rd Qu.:15.88 3rd Qu.:1.613 3rd Qu.:114.1
## Max. :16.10 Max. :20.40 Max. :1.970 Max. :117.8
## US/CM pH NTU
## Min. :80.90 Length:6 Min. : 2.000
## 1st Qu.:81.72 Class :character 1st Qu.: 9.775
## Median :84.15 Mode :character Median : 27.500
## Mean :85.28 Mean : 43.617
## 3rd Qu.:88.97 3rd Qu.: 82.500
## Max. :91.00 Max. :100.000
library(readxl)
Creek_Data_ <- read_excel("Creek Data .xlsx")
Creek_WQ<-Creek_Data_
summary(Creek_Data_)
## Week Date Site Reading
## Min. :1.0 Length:10 Length:10 Min. :1.0
## 1st Qu.:2.0 Class :character Class :character 1st Qu.:1.0
## Median :2.0 Mode :character Mode :character Median :1.0
## Mean :2.4 Mean :1.4
## 3rd Qu.:3.0 3rd Qu.:2.0
## Max. :5.0 Max. :2.0
## ËšC DO% DO mg/L SPC (Conductivity)
## Min. :12.60 Min. :11.70 Min. :1.250 Min. : 94.5
## 1st Qu.:14.03 1st Qu.:17.73 1st Qu.:1.802 1st Qu.:104.3
## Median :14.95 Median :23.10 Median :2.135 Median :107.5
## Mean :14.53 Mean :26.72 Mean :2.638 Mean :107.4
## 3rd Qu.:15.10 3rd Qu.:32.75 3rd Qu.:3.315 3rd Qu.:114.1
## Max. :15.90 Max. :53.40 Max. :5.200 Max. :116.3
## US/CM pH NTU
## Min. :72.00 Length:10 Min. : 2.20
## 1st Qu.:83.25 Class :character 1st Qu.: 9.45
## Median :85.60 Mode :character Median : 14.60
## Mean :85.75 Mean : 29.66
## 3rd Qu.:93.33 3rd Qu.: 28.77
## Max. :94.60 Max. :113.00
t.test(Creek_WQ$`ËšC`, Pond_WQ$`ËšC`, var.equal= FALSE)
##
## Welch Two Sample t-test
##
## data: Creek_WQ$`ËšC` and Pond_WQ$`ËšC`
## t = 0.627, df = 9.43, p-value = 0.5455
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -1.024578 1.817912
## sample estimates:
## mean of x mean of y
## 14.53000 14.13333
Just greater than aplha p value sig of 0.05, accept H0 - there is no significant difference between the means in the Sites- Pond/ Creek.
Together<- rbind(Pond_WQ, Creek_WQ)
library(ggplot2)
ggplot(Together, aes(x= Site, y=`ËšC`, fill= Site )) +
geom_boxplot()+
scale_fill_manual(values=c("seagreen3", "palevioletred"))+
geom_jitter(width = 0.2)+
xlab("Site")+
ggtitle("Boxplot of Temperature Across the Two Sites at Mimosa Creek")+
theme(text = element_text(family = "Times New Roman"))
From box plots - both very skewed, means very similar.
t.test(Creek_WQ$`DO%`, Pond_WQ$`DO%`, var.equal= FALSE)
##
## Welch Two Sample t-test
##
## data: Creek_WQ$`DO%` and Pond_WQ$`DO%`
## t = 2.896, df = 12.023, p-value = 0.0134
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 3.238819 22.901181
## sample estimates:
## mean of x mean of y
## 26.72 13.65
accept there is a sig difference in the means of % of Dissolved Oxygen
library(ggplot2)
ggplot(Together, aes(x= Site, y=`DO%`, fill= Site )) +
geom_boxplot()+
scale_fill_manual(values=c("seagreen3", "palevioletred"))+
geom_jitter(width = 0.2)+
xlab("Site")+
ggtitle("Boxplot of Percentage of Dissolved Oxygen Across the Two Sites
at Mimosa Creek")+
theme(text = element_text(family = "Times New Roman"))
t.test(Creek_WQ$`DO mg/L`, Pond_WQ$`DO mg/L`, var.equal= FALSE)
##
## Welch Two Sample t-test
##
## data: Creek_WQ$`DO mg/L` and Pond_WQ$`DO mg/L`
## t = 2.9303, df = 11.748, p-value = 0.01285
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.3284608 2.2508726
## sample estimates:
## mean of x mean of y
## 2.638000 1.348333
Means between the two sites significantly different p value less that 0.05.
library(ggplot2)
ggplot(Together, aes(x= Site, y=`DO mg/L`, fill= Site )) +
geom_boxplot()+
scale_fill_manual(values=c("seagreen3", "palevioletred"))+
geom_jitter(width = 0.2)+
xlab("Site")+
ggtitle("Boxplot of Dissolved Oxygen in Mg/L Across the Two Sites at
Mimosa Creek")+
theme(text = element_text(family = "Times New Roman"))
t.test(Creek_WQ$`SPC (Conductivity)`, Pond_WQ$`SPC (Conductivity)`, var.equal= FALSE)
##
## Welch Two Sample t-test
##
## data: Creek_WQ$`SPC (Conductivity)` and Pond_WQ$`SPC (Conductivity)`
## t = -0.094741, df = 11.069, p-value = 0.9262
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -9.282060 8.515393
## sample estimates:
## mean of x mean of y
## 107.4000 107.7833
Means between treatments are not significantly different due to P value being greater than p critical of 0.05, at 0.05% significance.
library(ggplot2)
ggplot(Together, aes(x= Site, y=`SPC (Conductivity)`, fill= Site )) +
geom_boxplot()+
scale_fill_manual(values=c("seagreen3", "palevioletred"))+
geom_jitter(width = 0.2)+
xlab("Site")+
ggtitle("Boxplot of SPC (Conductivity) Across the Two Sites at Mimosa Creek")+
theme(text = element_text(family = "Times New Roman"))
box plot shows means pretty equal too.
t.test(Creek_WQ$`US/CM`, Pond_WQ$`US/CM`, var.equal= FALSE)
##
## Welch Two Sample t-test
##
## data: Creek_WQ$`US/CM` and Pond_WQ$`US/CM`
## t = 0.14278, df = 13.836, p-value = 0.8885
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -6.551261 7.484594
## sample estimates:
## mean of x mean of y
## 85.75000 85.28333
p value is greater that p critical of 0.05 therefore, means do not significantly differ from each other when alpha set to 0.05.
library(ggplot2)
ggplot(Together, aes(x= Site, y=`US/CM`, fill= Site )) +
geom_boxplot()+
scale_fill_manual(values=c("seagreen3", "palevioletred"))+
geom_jitter(width = 0.2)+
xlab("Site")+
ggtitle("Boxplot of uS/cm Across the Two Sites at Mimosa Creek")+
theme(text = element_text(family = "Times New Roman"))
first the N/A values need to be removed from both sets of data:
Creek_WQ_NONA <- Creek_WQ[-3,]
View(Creek_WQ_NONA)
Pond_WQ_NONA<-Pond_WQ[-(3:4),]
View(Pond_WQ_NONA)
now these new data sets can be used to perform the t-test:
Creek_pH<-as.numeric(Creek_WQ_NONA$pH)
Pond_pH<-as.numeric(Pond_WQ_NONA$pH)
t.test(Creek_pH, Pond_pH, var.equal= FALSE)
##
## Welch Two Sample t-test
##
## data: Creek_pH and Pond_pH
## t = 1.0387, df = 10.602, p-value = 0.322
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.1323036 0.3667481
## sample estimates:
## mean of x mean of y
## 6.352222 6.235000
The p value is greater than the critical value of 0.05 therefore the means of pH between both sites do not differ significantly.
library(ggplot2)
Together_NA<-Together[-c(3,4,9),]
Together_NA$pH <- as.numeric(Together_NA$pH)
ggplot(Together_NA, aes(x= Site, y=`pH`, fill= Site )) +
geom_boxplot()+
scale_fill_manual(values=c("seagreen3","palevioletred"))+
geom_jitter(width = 0.2)+
xlab("Site")+
ggtitle("Boxplot of pH Across the Two Sites at Mimosa Creek")+
theme(text = element_text(family = "Times New Roman"))
means very similar.
t.test(Creek_WQ$NTU, Pond_WQ$NTU, var.equal= FALSE)
##
## Welch Two Sample t-test
##
## data: Creek_WQ$NTU and Pond_WQ$NTU
## t = -0.65184, df = 8.5964, p-value = 0.5315
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -62.74103 34.82770
## sample estimates:
## mean of x mean of y
## 29.66000 43.61667
T test is greater than 0.05 level of significance therefore, the means of NTU/ Turbidity between the sites does not differ significantly.
library(ggplot2)
ggplot(Together, aes(x= Site, y=`NTU`, fill= Site )) +
geom_boxplot()+
scale_fill_manual(values=c("seagreen3", "palevioletred"))+
geom_jitter(width = 0.2)+
xlab("Site")+
ggtitle("Boxplot of NTU Turbidity Across the Two Sites at Mimosa Creek")+
theme(text = element_text(family = "Times New Roman"))
For the time series data, data was averaged in excel for each week and site.
library(readxl)
Time_series_Graphs <- read_excel("Time series Graphs.xlsx")
View(Time_series_Graphs)
library(ggplot2)
ggplot(Time_series_Graphs, aes(x= Week, y=`ËšC`, group= Site,
color= Site)) +
geom_line(alpha=0.9, linetype=1) +
scale_color_manual(values=c("seagreen3", "palevioletred"))+
geom_point(size=2)+
ggtitle(" Change Over Time of Temperature at Two Sites Within Mimosa
Creek")+
theme(text = element_text(family = "Times New Roman"))
library(ggplot2)
ggplot(Time_series_Graphs, aes(x= Week, y=`DO%`, group= Site,
color= Site)) +
geom_line(alpha=0.9, linetype=1) +
scale_color_manual(values=c("seagreen3", "palevioletred"))+
geom_point(size=2)+
ggtitle(" Change Over Time of Percentage of Dissolved Oxygen
at Two Sites Within Mimosa Creek")+
theme(text = element_text(family = "Times New Roman"))
library(ggplot2)
ggplot(Time_series_Graphs, aes(x= Week, y=`DO mg/L`, group= Site,
color= Site)) +
geom_line(alpha=0.9, linetype=1) +
scale_color_manual(values=c("seagreen3", "palevioletred"))+
geom_point(size=2)+
ggtitle(" Change Over Time of Dissolved Oxygen in mg/L at Two Sites
Within Mimosa Creek")+
theme(text = element_text(family = "Times New Roman"))
library(ggplot2)
ggplot(Time_series_Graphs, aes(x= Week, y=`SPC (Conductivity)`, group= Site,
color= Site)) +
geom_line(alpha=0.9, linetype=1) +
scale_color_manual(values=c("seagreen3", "palevioletred"))+
geom_point(size=2)+
ggtitle(" Change Over Time of SPC (Conductivity) at Two Sites Within Mimosa
Creek")+
theme(text = element_text(family = "Times New Roman"))
library(ggplot2)
ggplot(Time_series_Graphs, aes(x= Week, y=`US/CM`, group= Site,
color= Site)) +
geom_line(alpha=0.9, linetype=1) +
scale_color_manual(values=c("seagreen3", "palevioletred"))+
geom_point(size=2)+
ggtitle(" Change Over Time of US/CM at Two Sites Within Mimosa
Creek")+
theme(text = element_text(family = "Times New Roman"))
library(ggplot2)
ggplot(Time_series_Graphs, aes(x= Week, y=`NTU`, group= Site,
color= Site)) +
geom_line(alpha=0.9, linetype=1) +
scale_color_manual(values=c("seagreen3","palevioletred"))+
geom_point(size=2)+
ggtitle(" Change Over Time of NTU at Two Sites Within Mimosa
Creek")+
theme(text = element_text(family = "Times New Roman"))
N/A for week two of Pond site, hence not graphed. Creek site was graphed and a new data set with the week 5 reading for Creek was imported.
library(readxl)
Creek_pH_time_series <- read_excel("Creek_pH_time_series.xlsx")
library(ggplot2)
ggplot(Creek_pH_time_series, aes(x= Week, y=`pH`, group= Site))+
geom_line( color="seagreen3", alpha=0.9, linewidth=1, linetype=1) +
geom_point(size=2, color= "seagreen3")+
ggtitle(" Change Over Time of pH at the 'Natural' Creek Site Within Mimosa
Creek")+
theme(text = element_text(family = "Times New Roman"))
Non Metric Multi Dimensional Scaling Data in excel was transformmed so that the rows were sites and collums Macroinvertebrates.
library("vegan")
## Loading required package: permute
## Loading required package: lattice
## This is vegan 2.6-4
library(readxl)
rivers_catchement <- read_excel("rivers_catchement.xlsx",
sheet = "Sheet1")
View(rivers_catchement)
data_1<-rivers_catchement[,2:26]
data_2<-rivers_catchement[1]
set.seed(3)
library("vegan")
NMDS<-metaMDS(data_1, distance= "bray")
## Square root transformation
## Wisconsin double standardization
## Run 0 stress 0.07057647
## Run 1 stress 0.07794169
## Run 2 stress 0.07057647
## ... New best solution
## ... Procrustes: rmse 1.764203e-05 max resid 3.15758e-05
## ... Similar to previous best
## Run 3 stress 0.07057647
## ... Procrustes: rmse 3.645766e-06 max resid 6.445854e-06
## ... Similar to previous best
## Run 4 stress 0.07794169
## Run 5 stress 0.07794169
## Run 6 stress 0.0779417
## Run 7 stress 0.0779417
## Run 8 stress 0.07057647
## ... Procrustes: rmse 5.574472e-06 max resid 9.175593e-06
## ... Similar to previous best
## Run 9 stress 0.07794169
## Run 10 stress 0.07057648
## ... Procrustes: rmse 2.861417e-05 max resid 5.116736e-05
## ... Similar to previous best
## Run 11 stress 0.07057647
## ... Procrustes: rmse 1.41051e-05 max resid 2.620893e-05
## ... Similar to previous best
## Run 12 stress 0.08993601
## Run 13 stress 0.07057647
## ... Procrustes: rmse 2.604887e-05 max resid 4.66071e-05
## ... Similar to previous best
## Run 14 stress 0.07057647
## ... New best solution
## ... Procrustes: rmse 4.330174e-06 max resid 7.713613e-06
## ... Similar to previous best
## Run 15 stress 0.07794172
## Run 16 stress 0.137334
## Run 17 stress 0.07057649
## ... Procrustes: rmse 2.179782e-05 max resid 5.330827e-05
## ... Similar to previous best
## Run 18 stress 0.07057647
## ... Procrustes: rmse 3.804074e-06 max resid 9.171467e-06
## ... Similar to previous best
## Run 19 stress 0.0779417
## Run 20 stress 0.07057647
## ... Procrustes: rmse 4.402455e-06 max resid 7.496248e-06
## ... Similar to previous best
## *** Best solution repeated 4 times
NMDS$stress
## [1] 0.07057647
stress value is 0.07 this indicates a good fit.
set.seed(3)
library("vegan")
library("ggplot2")
scores<-scores(NMDS, display="site")
scores <- cbind(as.data.frame(scores), Habitat = data_2$Habitat)
centroids <- aggregate(cbind(NMDS1, NMDS2) ~ Habitat, data = scores, FUN = mean)
seg <- merge(scores, setNames(centroids, c('Habitat','oNMDS1','oNMDS2')),
by = 'Habitat', sort = FALSE)
ggplot(scores, aes(x = NMDS1, y = NMDS2, colour = Habitat))+
scale_color_manual(values=c("seagreen4", "olivedrab", "palegreen3",
"darkcyan", "cornflowerblue", "deepskyblue3",
"coral1", "sienna3","brown2", "indianred3",
"maroon", "palevioletred"))+
geom_segment(data = seg,
mapping = aes(xend = oNMDS1, yend = oNMDS2)) +
geom_point(data = centroids, size = 4) +
geom_point() +
geom_text(label= data_2$Habitat,
nudge_x = 0.01, nudge_y = 0.1,
check_overlap = F)+
ggtitle("NMDS To Represent Macroinvertebrate Assembleges
Across Sites Within Leaf Litter")+
theme(plot.title = element_text(hjust = 0.5),
text = element_text(family = "Times New Roman"))
Creek B1,B2,B3 Values overlap due to the same scores (could be due to variety of reasons.
fit<-adonis(data_1~ Habitat, data= data_2, premutations=999, method= "bray")
## 'adonis' will be deprecated: use 'adonis2' instead
fit
## $aov.tab
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## Habitat 11 1.4527 0 0 1 1
## Residuals 0 0.0000 Inf 0
## Total 11 1.4527 1
##
## $call
## adonis(formula = data_1 ~ Habitat, data = data_2, method = "bray",
## premutations = 999)
##
## $coefficients
## water mites Snail Limpet Shrimp Yabbie Beetle Diving Beetle
## (Intercept) 0.4166667 0 0 0 0 0.1666667 0
## Habitat1 -0.4166667 0 0 0 0 1.8333333 0
## Habitat2 -0.4166667 0 0 0 0 -0.1666667 0
## Habitat3 -0.4166667 0 0 0 0 -0.1666667 0
## Habitat4 -0.4166667 0 0 0 0 -0.1666667 0
## Habitat5 -0.4166667 0 0 0 0 -0.1666667 0
## Habitat6 -0.4166667 0 0 0 0 -0.1666667 0
## Habitat7 1.5833333 0 0 0 0 -0.1666667 0
## Habitat8 -0.4166667 0 0 0 0 -0.1666667 0
## Habitat9 -0.4166667 0 0 0 0 -0.1666667 0
## Habitat10 -0.4166667 0 0 0 0 -0.1666667 0
## Habitat11 -0.4166667 0 0 0 0 -0.1666667 0
## Beetle (adult) Beetle (larvae) Marsh beetle (larvae) Midge
## (Intercept) 0 0 0 50.9166667
## Habitat1 0 0 0 14.0833333
## Habitat2 0 0 0 -33.9166667
## Habitat3 0 0 0 8.0833333
## Habitat4 0 0 0 -10.9166667
## Habitat5 0 0 0 -39.9166667
## Habitat6 0 0 0 24.0833333
## Habitat7 0 0 0 -0.9166667
## Habitat8 0 0 0 95.0833333
## Habitat9 0 0 0 -19.9166667
## Habitat10 0 0 0 -25.9166667
## Habitat11 0 0 0 11.0833333
## Ghost Midge Mayfly Water meter Damselfly Dragonfly nymph
## (Intercept) 0 0 0 0.08333333 0.75
## Habitat1 0 0 0 -0.08333333 -0.75
## Habitat2 0 0 0 -0.08333333 0.25
## Habitat3 0 0 0 -0.08333333 -0.75
## Habitat4 0 0 0 -0.08333333 -0.75
## Habitat5 0 0 0 -0.08333333 -0.75
## Habitat6 0 0 0 -0.08333333 -0.75
## Habitat7 0 0 0 -0.08333333 5.25
## Habitat8 0 0 0 0.91666667 -0.75
## Habitat9 0 0 0 -0.08333333 0.25
## Habitat10 0 0 0 -0.08333333 0.25
## Habitat11 0 0 0 -0.08333333 -0.75
## Narrow-wing damselfly Dragonfly nymph Lest Stick Caddis Sand caddis
## (Intercept) 0 0 0.25 0
## Habitat1 0 0 -0.25 0
## Habitat2 0 0 0.75 0
## Habitat3 0 0 -0.25 0
## Habitat4 0 0 -0.25 0
## Habitat5 0 0 -0.25 0
## Habitat6 0 0 -0.25 0
## Habitat7 0 0 -0.25 0
## Habitat8 0 0 -0.25 0
## Habitat9 0 0 1.75 0
## Habitat10 0 0 -0.25 0
## Habitat11 0 0 -0.25 0
## Flat leaf caddis Water fleas Seed shrimp worm mosquito larvae
## (Intercept) 0 0 1 9.083333 0.1666667
## Habitat1 0 0 -1 -9.083333 -0.1666667
## Habitat2 0 0 -1 -9.083333 -0.1666667
## Habitat3 0 0 -1 -9.083333 -0.1666667
## Habitat4 0 0 -1 -9.083333 -0.1666667
## Habitat5 0 0 -1 -9.083333 -0.1666667
## Habitat6 0 0 -1 -9.083333 -0.1666667
## Habitat7 0 0 -1 -9.083333 -0.1666667
## Habitat8 0 0 1 -9.083333 -0.1666667
## Habitat9 0 0 9 -9.083333 -0.1666667
## Habitat10 0 0 -1 -9.083333 -0.1666667
## Habitat11 0 0 -1 20.916667 1.8333333
##
## $coef.sites
## 1 2 3 4 5
## (Intercept) 0.35223035 0.54559068 0.41925447 0.400025490 0.41673094
## Habitat1 -0.15223035 -0.14744253 0.02218697 0.062340101 -0.18691727
## Habitat2 0.18023719 0.25202837 -0.02242908 -0.200025490 0.28238411
## Habitat3 -0.20693120 -0.11289837 -0.02119622 0.011739215 -0.18797277
## Habitat4 -0.16855688 0.03112890 -0.15734971 -0.157601248 -0.01374586
## Habitat5 0.32892907 0.31690932 0.18074553 0.005379915 0.37374525
## Habitat6 -0.10411005 -0.21523353 0.05973712 0.104925005 -0.15045875
## Habitat7 -0.35223035 -0.02868246 -0.04670545 -0.019073109 -0.07462567
## Habitat8 0.16467787 -0.54559068 0.23877662 0.314260224 0.07298100
## Habitat9 0.02031867 0.11244041 -0.41925447 -0.142882633 0.13399370
## Habitat10 0.02872203 0.16869504 -0.16211162 -0.400025490 0.16660240
## Habitat11 -0.01012508 -0.05587874 0.13147017 0.183307843 -0.41673094
## 6 7 8 9 10
## (Intercept) 0.602009742 0.34329240 0.48866101 0.32419387 0.33449417
## Habitat1 0.062794727 -0.34329240 0.11599015 -0.26070181 -0.08215772
## Habitat2 0.138448273 0.26135877 -0.48866101 0.23990869 0.08923465
## Habitat3 0.047113065 -0.27980033 0.07544155 -0.32419387 -0.14257498
## Habitat4 0.003253416 -0.09095595 -0.06493220 -0.13227468 -0.33449417
## Habitat5 0.219128469 0.37465632 -0.22199434 0.36152041 0.23413328
## Habitat6 0.077134643 -0.25878535 0.14963686 -0.20479089 -0.03014634
## Habitat7 0.021519670 -0.14329240 0.04380652 -0.17889473 -0.15082070
## Habitat8 0.168105201 0.05485575 0.30895804 0.10849843 0.24222541
## Habitat9 0.013374873 0.09814905 -0.09183561 0.07386438 -0.07258941
## Habitat10 0.035671417 0.11907320 -0.28866101 0.08757083 -0.09206993
## Habitat11 -0.184534014 -0.11347873 0.21045403 -0.09543570 0.06849091
## 11 12
## (Intercept) 0.595318533 0.36654816
## Habitat1 0.122630185 -0.28204111
## Habitat2 -0.328651866 0.27174972
## Habitat3 0.090395753 -0.24714517
## Habitat4 -0.026691082 -0.06220033
## Habitat5 -0.595318533 0.37763789
## Habitat6 0.148867514 -0.36654816
## Habitat7 0.085840887 -0.11842786
## Habitat8 0.267181467 -0.03619101
## Habitat9 0.004681467 0.11244344
## Habitat10 -0.189913128 0.13840234
## Habitat11 0.195157658 -0.10027597
##
## $f.perms
## [,1]
## [1,] 0
## [2,] 0
## [3,] 0
## [4,] 0
## [5,] 0
## [6,] 0
## [7,] 0
## [8,] 0
## [9,] 0
## [10,] 0
## [11,] 0
## [12,] 0
## [13,] 0
## [14,] 0
## [15,] 0
## [16,] 0
## [17,] 0
## [18,] 0
## [19,] 0
## [20,] 0
## [21,] 0
## [22,] 0
## [23,] 0
## [24,] 0
## [25,] 0
## [26,] 0
## [27,] 0
## [28,] 0
## [29,] 0
## [30,] 0
## [31,] 0
## [32,] 0
## [33,] 0
## [34,] 0
## [35,] 0
## [36,] 0
## [37,] 0
## [38,] 0
## [39,] 0
## [40,] 0
## [41,] 0
## [42,] 0
## [43,] 0
## [44,] 0
## [45,] 0
## [46,] 0
## [47,] 0
## [48,] 0
## [49,] 0
## [50,] 0
## [51,] 0
## [52,] 0
## [53,] 0
## [54,] 0
## [55,] 0
## [56,] 0
## [57,] 0
## [58,] 0
## [59,] 0
## [60,] 0
## [61,] 0
## [62,] 0
## [63,] 0
## [64,] 0
## [65,] 0
## [66,] 0
## [67,] 0
## [68,] 0
## [69,] 0
## [70,] 0
## [71,] 0
## [72,] 0
## [73,] 0
## [74,] 0
## [75,] 0
## [76,] 0
## [77,] 0
## [78,] 0
## [79,] 0
## [80,] 0
## [81,] 0
## [82,] 0
## [83,] 0
## [84,] 0
## [85,] 0
## [86,] 0
## [87,] 0
## [88,] 0
## [89,] 0
## [90,] 0
## [91,] 0
## [92,] 0
## [93,] 0
## [94,] 0
## [95,] 0
## [96,] 0
## [97,] 0
## [98,] 0
## [99,] 0
## [100,] 0
## [101,] 0
## [102,] 0
## [103,] 0
## [104,] 0
## [105,] 0
## [106,] 0
## [107,] 0
## [108,] 0
## [109,] 0
## [110,] 0
## [111,] 0
## [112,] 0
## [113,] 0
## [114,] 0
## [115,] 0
## [116,] 0
## [117,] 0
## [118,] 0
## [119,] 0
## [120,] 0
## [121,] 0
## [122,] 0
## [123,] 0
## [124,] 0
## [125,] 0
## [126,] 0
## [127,] 0
## [128,] 0
## [129,] 0
## [130,] 0
## [131,] 0
## [132,] 0
## [133,] 0
## [134,] 0
## [135,] 0
## [136,] 0
## [137,] 0
## [138,] 0
## [139,] 0
## [140,] 0
## [141,] 0
## [142,] 0
## [143,] 0
## [144,] 0
## [145,] 0
## [146,] 0
## [147,] 0
## [148,] 0
## [149,] 0
## [150,] 0
## [151,] 0
## [152,] 0
## [153,] 0
## [154,] 0
## [155,] 0
## [156,] 0
## [157,] 0
## [158,] 0
## [159,] 0
## [160,] 0
## [161,] 0
## [162,] 0
## [163,] 0
## [164,] 0
## [165,] 0
## [166,] 0
## [167,] 0
## [168,] 0
## [169,] 0
## [170,] 0
## [171,] 0
## [172,] 0
## [173,] 0
## [174,] 0
## [175,] 0
## [176,] 0
## [177,] 0
## [178,] 0
## [179,] 0
## [180,] 0
## [181,] 0
## [182,] 0
## [183,] 0
## [184,] 0
## [185,] 0
## [186,] 0
## [187,] 0
## [188,] 0
## [189,] 0
## [190,] 0
## [191,] 0
## [192,] 0
## [193,] 0
## [194,] 0
## [195,] 0
## [196,] 0
## [197,] 0
## [198,] 0
## [199,] 0
## [200,] 0
## [201,] 0
## [202,] 0
## [203,] 0
## [204,] 0
## [205,] 0
## [206,] 0
## [207,] 0
## [208,] 0
## [209,] 0
## [210,] 0
## [211,] 0
## [212,] 0
## [213,] 0
## [214,] 0
## [215,] 0
## [216,] 0
## [217,] 0
## [218,] 0
## [219,] 0
## [220,] 0
## [221,] 0
## [222,] 0
## [223,] 0
## [224,] 0
## [225,] 0
## [226,] 0
## [227,] 0
## [228,] 0
## [229,] 0
## [230,] 0
## [231,] 0
## [232,] 0
## [233,] 0
## [234,] 0
## [235,] 0
## [236,] 0
## [237,] 0
## [238,] 0
## [239,] 0
## [240,] 0
## [241,] 0
## [242,] 0
## [243,] 0
## [244,] 0
## [245,] 0
## [246,] 0
## [247,] 0
## [248,] 0
## [249,] 0
## [250,] 0
## [251,] 0
## [252,] 0
## [253,] 0
## [254,] 0
## [255,] 0
## [256,] 0
## [257,] 0
## [258,] 0
## [259,] 0
## [260,] 0
## [261,] 0
## [262,] 0
## [263,] 0
## [264,] 0
## [265,] 0
## [266,] 0
## [267,] 0
## [268,] 0
## [269,] 0
## [270,] 0
## [271,] 0
## [272,] 0
## [273,] 0
## [274,] 0
## [275,] 0
## [276,] 0
## [277,] 0
## [278,] 0
## [279,] 0
## [280,] 0
## [281,] 0
## [282,] 0
## [283,] 0
## [284,] 0
## [285,] 0
## [286,] 0
## [287,] 0
## [288,] 0
## [289,] 0
## [290,] 0
## [291,] 0
## [292,] 0
## [293,] 0
## [294,] 0
## [295,] 0
## [296,] 0
## [297,] 0
## [298,] 0
## [299,] 0
## [300,] 0
## [301,] 0
## [302,] 0
## [303,] 0
## [304,] 0
## [305,] 0
## [306,] 0
## [307,] 0
## [308,] 0
## [309,] 0
## [310,] 0
## [311,] 0
## [312,] 0
## [313,] 0
## [314,] 0
## [315,] 0
## [316,] 0
## [317,] 0
## [318,] 0
## [319,] 0
## [320,] 0
## [321,] 0
## [322,] 0
## [323,] 0
## [324,] 0
## [325,] 0
## [326,] 0
## [327,] 0
## [328,] 0
## [329,] 0
## [330,] 0
## [331,] 0
## [332,] 0
## [333,] 0
## [334,] 0
## [335,] 0
## [336,] 0
## [337,] 0
## [338,] 0
## [339,] 0
## [340,] 0
## [341,] 0
## [342,] 0
## [343,] 0
## [344,] 0
## [345,] 0
## [346,] 0
## [347,] 0
## [348,] 0
## [349,] 0
## [350,] 0
## [351,] 0
## [352,] 0
## [353,] 0
## [354,] 0
## [355,] 0
## [356,] 0
## [357,] 0
## [358,] 0
## [359,] 0
## [360,] 0
## [361,] 0
## [362,] 0
## [363,] 0
## [364,] 0
## [365,] 0
## [366,] 0
## [367,] 0
## [368,] 0
## [369,] 0
## [370,] 0
## [371,] 0
## [372,] 0
## [373,] 0
## [374,] 0
## [375,] 0
## [376,] 0
## [377,] 0
## [378,] 0
## [379,] 0
## [380,] 0
## [381,] 0
## [382,] 0
## [383,] 0
## [384,] 0
## [385,] 0
## [386,] 0
## [387,] 0
## [388,] 0
## [389,] 0
## [390,] 0
## [391,] 0
## [392,] 0
## [393,] 0
## [394,] 0
## [395,] 0
## [396,] 0
## [397,] 0
## [398,] 0
## [399,] 0
## [400,] 0
## [401,] 0
## [402,] 0
## [403,] 0
## [404,] 0
## [405,] 0
## [406,] 0
## [407,] 0
## [408,] 0
## [409,] 0
## [410,] 0
## [411,] 0
## [412,] 0
## [413,] 0
## [414,] 0
## [415,] 0
## [416,] 0
## [417,] 0
## [418,] 0
## [419,] 0
## [420,] 0
## [421,] 0
## [422,] 0
## [423,] 0
## [424,] 0
## [425,] 0
## [426,] 0
## [427,] 0
## [428,] 0
## [429,] 0
## [430,] 0
## [431,] 0
## [432,] 0
## [433,] 0
## [434,] 0
## [435,] 0
## [436,] 0
## [437,] 0
## [438,] 0
## [439,] 0
## [440,] 0
## [441,] 0
## [442,] 0
## [443,] 0
## [444,] 0
## [445,] 0
## [446,] 0
## [447,] 0
## [448,] 0
## [449,] 0
## [450,] 0
## [451,] 0
## [452,] 0
## [453,] 0
## [454,] 0
## [455,] 0
## [456,] 0
## [457,] 0
## [458,] 0
## [459,] 0
## [460,] 0
## [461,] 0
## [462,] 0
## [463,] 0
## [464,] 0
## [465,] 0
## [466,] 0
## [467,] 0
## [468,] 0
## [469,] 0
## [470,] 0
## [471,] 0
## [472,] 0
## [473,] 0
## [474,] 0
## [475,] 0
## [476,] 0
## [477,] 0
## [478,] 0
## [479,] 0
## [480,] 0
## [481,] 0
## [482,] 0
## [483,] 0
## [484,] 0
## [485,] 0
## [486,] 0
## [487,] 0
## [488,] 0
## [489,] 0
## [490,] 0
## [491,] 0
## [492,] 0
## [493,] 0
## [494,] 0
## [495,] 0
## [496,] 0
## [497,] 0
## [498,] 0
## [499,] 0
## [500,] 0
## [501,] 0
## [502,] 0
## [503,] 0
## [504,] 0
## [505,] 0
## [506,] 0
## [507,] 0
## [508,] 0
## [509,] 0
## [510,] 0
## [511,] 0
## [512,] 0
## [513,] 0
## [514,] 0
## [515,] 0
## [516,] 0
## [517,] 0
## [518,] 0
## [519,] 0
## [520,] 0
## [521,] 0
## [522,] 0
## [523,] 0
## [524,] 0
## [525,] 0
## [526,] 0
## [527,] 0
## [528,] 0
## [529,] 0
## [530,] 0
## [531,] 0
## [532,] 0
## [533,] 0
## [534,] 0
## [535,] 0
## [536,] 0
## [537,] 0
## [538,] 0
## [539,] 0
## [540,] 0
## [541,] 0
## [542,] 0
## [543,] 0
## [544,] 0
## [545,] 0
## [546,] 0
## [547,] 0
## [548,] 0
## [549,] 0
## [550,] 0
## [551,] 0
## [552,] 0
## [553,] 0
## [554,] 0
## [555,] 0
## [556,] 0
## [557,] 0
## [558,] 0
## [559,] 0
## [560,] 0
## [561,] 0
## [562,] 0
## [563,] 0
## [564,] 0
## [565,] 0
## [566,] 0
## [567,] 0
## [568,] 0
## [569,] 0
## [570,] 0
## [571,] 0
## [572,] 0
## [573,] 0
## [574,] 0
## [575,] 0
## [576,] 0
## [577,] 0
## [578,] 0
## [579,] 0
## [580,] 0
## [581,] 0
## [582,] 0
## [583,] 0
## [584,] 0
## [585,] 0
## [586,] 0
## [587,] 0
## [588,] 0
## [589,] 0
## [590,] 0
## [591,] 0
## [592,] 0
## [593,] 0
## [594,] 0
## [595,] 0
## [596,] 0
## [597,] 0
## [598,] 0
## [599,] 0
## [600,] 0
## [601,] 0
## [602,] 0
## [603,] 0
## [604,] 0
## [605,] 0
## [606,] 0
## [607,] 0
## [608,] 0
## [609,] 0
## [610,] 0
## [611,] 0
## [612,] 0
## [613,] 0
## [614,] 0
## [615,] 0
## [616,] 0
## [617,] 0
## [618,] 0
## [619,] 0
## [620,] 0
## [621,] 0
## [622,] 0
## [623,] 0
## [624,] 0
## [625,] 0
## [626,] 0
## [627,] 0
## [628,] 0
## [629,] 0
## [630,] 0
## [631,] 0
## [632,] 0
## [633,] 0
## [634,] 0
## [635,] 0
## [636,] 0
## [637,] 0
## [638,] 0
## [639,] 0
## [640,] 0
## [641,] 0
## [642,] 0
## [643,] 0
## [644,] 0
## [645,] 0
## [646,] 0
## [647,] 0
## [648,] 0
## [649,] 0
## [650,] 0
## [651,] 0
## [652,] 0
## [653,] 0
## [654,] 0
## [655,] 0
## [656,] 0
## [657,] 0
## [658,] 0
## [659,] 0
## [660,] 0
## [661,] 0
## [662,] 0
## [663,] 0
## [664,] 0
## [665,] 0
## [666,] 0
## [667,] 0
## [668,] 0
## [669,] 0
## [670,] 0
## [671,] 0
## [672,] 0
## [673,] 0
## [674,] 0
## [675,] 0
## [676,] 0
## [677,] 0
## [678,] 0
## [679,] 0
## [680,] 0
## [681,] 0
## [682,] 0
## [683,] 0
## [684,] 0
## [685,] 0
## [686,] 0
## [687,] 0
## [688,] 0
## [689,] 0
## [690,] 0
## [691,] 0
## [692,] 0
## [693,] 0
## [694,] 0
## [695,] 0
## [696,] 0
## [697,] 0
## [698,] 0
## [699,] 0
## [700,] 0
## [701,] 0
## [702,] 0
## [703,] 0
## [704,] 0
## [705,] 0
## [706,] 0
## [707,] 0
## [708,] 0
## [709,] 0
## [710,] 0
## [711,] 0
## [712,] 0
## [713,] 0
## [714,] 0
## [715,] 0
## [716,] 0
## [717,] 0
## [718,] 0
## [719,] 0
## [720,] 0
## [721,] 0
## [722,] 0
## [723,] 0
## [724,] 0
## [725,] 0
## [726,] 0
## [727,] 0
## [728,] 0
## [729,] 0
## [730,] 0
## [731,] 0
## [732,] 0
## [733,] 0
## [734,] 0
## [735,] 0
## [736,] 0
## [737,] 0
## [738,] 0
## [739,] 0
## [740,] 0
## [741,] 0
## [742,] 0
## [743,] 0
## [744,] 0
## [745,] 0
## [746,] 0
## [747,] 0
## [748,] 0
## [749,] 0
## [750,] 0
## [751,] 0
## [752,] 0
## [753,] 0
## [754,] 0
## [755,] 0
## [756,] 0
## [757,] 0
## [758,] 0
## [759,] 0
## [760,] 0
## [761,] 0
## [762,] 0
## [763,] 0
## [764,] 0
## [765,] 0
## [766,] 0
## [767,] 0
## [768,] 0
## [769,] 0
## [770,] 0
## [771,] 0
## [772,] 0
## [773,] 0
## [774,] 0
## [775,] 0
## [776,] 0
## [777,] 0
## [778,] 0
## [779,] 0
## [780,] 0
## [781,] 0
## [782,] 0
## [783,] 0
## [784,] 0
## [785,] 0
## [786,] 0
## [787,] 0
## [788,] 0
## [789,] 0
## [790,] 0
## [791,] 0
## [792,] 0
## [793,] 0
## [794,] 0
## [795,] 0
## [796,] 0
## [797,] 0
## [798,] 0
## [799,] 0
## [800,] 0
## [801,] 0
## [802,] 0
## [803,] 0
## [804,] 0
## [805,] 0
## [806,] 0
## [807,] 0
## [808,] 0
## [809,] 0
## [810,] 0
## [811,] 0
## [812,] 0
## [813,] 0
## [814,] 0
## [815,] 0
## [816,] 0
## [817,] 0
## [818,] 0
## [819,] 0
## [820,] 0
## [821,] 0
## [822,] 0
## [823,] 0
## [824,] 0
## [825,] 0
## [826,] 0
## [827,] 0
## [828,] 0
## [829,] 0
## [830,] 0
## [831,] 0
## [832,] 0
## [833,] 0
## [834,] 0
## [835,] 0
## [836,] 0
## [837,] 0
## [838,] 0
## [839,] 0
## [840,] 0
## [841,] 0
## [842,] 0
## [843,] 0
## [844,] 0
## [845,] 0
## [846,] 0
## [847,] 0
## [848,] 0
## [849,] 0
## [850,] 0
## [851,] 0
## [852,] 0
## [853,] 0
## [854,] 0
## [855,] 0
## [856,] 0
## [857,] 0
## [858,] 0
## [859,] 0
## [860,] 0
## [861,] 0
## [862,] 0
## [863,] 0
## [864,] 0
## [865,] 0
## [866,] 0
## [867,] 0
## [868,] 0
## [869,] 0
## [870,] 0
## [871,] 0
## [872,] 0
## [873,] 0
## [874,] 0
## [875,] 0
## [876,] 0
## [877,] 0
## [878,] 0
## [879,] 0
## [880,] 0
## [881,] 0
## [882,] 0
## [883,] 0
## [884,] 0
## [885,] 0
## [886,] 0
## [887,] 0
## [888,] 0
## [889,] 0
## [890,] 0
## [891,] 0
## [892,] 0
## [893,] 0
## [894,] 0
## [895,] 0
## [896,] 0
## [897,] 0
## [898,] 0
## [899,] 0
## [900,] 0
## [901,] 0
## [902,] 0
## [903,] 0
## [904,] 0
## [905,] 0
## [906,] 0
## [907,] 0
## [908,] 0
## [909,] 0
## [910,] 0
## [911,] 0
## [912,] 0
## [913,] 0
## [914,] 0
## [915,] 0
## [916,] 0
## [917,] 0
## [918,] 0
## [919,] 0
## [920,] 0
## [921,] 0
## [922,] 0
## [923,] 0
## [924,] 0
## [925,] 0
## [926,] 0
## [927,] 0
## [928,] 0
## [929,] 0
## [930,] 0
## [931,] 0
## [932,] 0
## [933,] 0
## [934,] 0
## [935,] 0
## [936,] 0
## [937,] 0
## [938,] 0
## [939,] 0
## [940,] 0
## [941,] 0
## [942,] 0
## [943,] 0
## [944,] 0
## [945,] 0
## [946,] 0
## [947,] 0
## [948,] 0
## [949,] 0
## [950,] 0
## [951,] 0
## [952,] 0
## [953,] 0
## [954,] 0
## [955,] 0
## [956,] 0
## [957,] 0
## [958,] 0
## [959,] 0
## [960,] 0
## [961,] 0
## [962,] 0
## [963,] 0
## [964,] 0
## [965,] 0
## [966,] 0
## [967,] 0
## [968,] 0
## [969,] 0
## [970,] 0
## [971,] 0
## [972,] 0
## [973,] 0
## [974,] 0
## [975,] 0
## [976,] 0
## [977,] 0
## [978,] 0
## [979,] 0
## [980,] 0
## [981,] 0
## [982,] 0
## [983,] 0
## [984,] 0
## [985,] 0
## [986,] 0
## [987,] 0
## [988,] 0
## [989,] 0
## [990,] 0
## [991,] 0
## [992,] 0
## [993,] 0
## [994,] 0
## [995,] 0
## [996,] 0
## [997,] 0
## [998,] 0
## [999,] 0
##
## $model.matrix
## (Intercept) Habitat1 Habitat2 Habitat3 Habitat4 Habitat5 Habitat6 Habitat7
## 1 1 0 0 0 0 0 0 1
## 2 1 0 0 0 0 0 0 0
## 3 1 0 0 0 0 0 0 0
## 4 1 0 0 0 0 0 0 0
## 5 1 0 0 0 0 0 0 0
## 6 1 -1 -1 -1 -1 -1 -1 -1
## 7 1 1 0 0 0 0 0 0
## 8 1 0 1 0 0 0 0 0
## 9 1 0 0 1 0 0 0 0
## 10 1 0 0 0 1 0 0 0
## 11 1 0 0 0 0 1 0 0
## 12 1 0 0 0 0 0 1 0
## Habitat8 Habitat9 Habitat10 Habitat11
## 1 0 0 0 0
## 2 1 0 0 0
## 3 0 1 0 0
## 4 0 0 1 0
## 5 0 0 0 1
## 6 -1 -1 -1 -1
## 7 0 0 0 0
## 8 0 0 0 0
## 9 0 0 0 0
## 10 0 0 0 0
## 11 0 0 0 0
## 12 0 0 0 0
##
## $terms
## data_1 ~ Habitat
## attr(,"variables")
## list(data_1, Habitat)
## attr(,"factors")
## Habitat
## data_1 0
## Habitat 1
## attr(,"term.labels")
## [1] "Habitat"
## attr(,"order")
## [1] 1
## attr(,"intercept")
## [1] 1
## attr(,"response")
## [1] 1
## attr(,".Environment")
## <environment: R_GlobalEnv>
##
## attr(,"class")
## [1] "adonis"
Pr is not significant as it is greater than the critical value of 0.05 at 95% significance, therefore the macroinvertebrate assemblages do not differ to a statistical significance across sites.
Data was transforrmed in excel again.
library(readxl)
Species_List <- read_excel("Species_List.xlsx",
sheet = "Sheet2")
View(Species_List)
data_1_Waders<-Species_List[,2:23]
data_2_Waders<-Species_List[1]
set.seed(3)
library("vegan")
NMDS_2<-metaMDS(data_1_Waders, distance= "bray")
## Square root transformation
## Wisconsin double standardization
## Run 0 stress 0.06459876
## Run 1 stress 0.1242155
## Run 2 stress 0.06459929
## ... Procrustes: rmse 0.0005157377 max resid 0.001008514
## ... Similar to previous best
## Run 3 stress 0.06459895
## ... Procrustes: rmse 0.0002134384 max resid 0.0004169879
## ... Similar to previous best
## Run 4 stress 0.06459874
## ... New best solution
## ... Procrustes: rmse 3.533919e-05 max resid 6.85688e-05
## ... Similar to previous best
## Run 5 stress 0.06459912
## ... Procrustes: rmse 0.000366216 max resid 0.0007081986
## ... Similar to previous best
## Run 6 stress 0.06459864
## ... New best solution
## ... Procrustes: rmse 0.0001452467 max resid 0.0002840196
## ... Similar to previous best
## Run 7 stress 0.06459886
## ... Procrustes: rmse 0.001639206 max resid 0.00319812
## ... Similar to previous best
## Run 8 stress 0.06459896
## ... Procrustes: rmse 0.001747953 max resid 0.003412246
## ... Similar to previous best
## Run 9 stress 0.06459865
## ... Procrustes: rmse 1.800576e-05 max resid 3.534549e-05
## ... Similar to previous best
## Run 10 stress 0.06459938
## ... Procrustes: rmse 0.0007149274 max resid 0.00140369
## ... Similar to previous best
## Run 11 stress 0.06459904
## ... Procrustes: rmse 0.0004789946 max resid 0.0009377635
## ... Similar to previous best
## Run 12 stress 0.06459876
## ... Procrustes: rmse 0.001530376 max resid 0.002987498
## ... Similar to previous best
## Run 13 stress 0.06459897
## ... Procrustes: rmse 0.0004087109 max resid 0.0008008491
## ... Similar to previous best
## Run 14 stress 0.06459867
## ... Procrustes: rmse 5.377294e-05 max resid 0.0001040124
## ... Similar to previous best
## Run 15 stress 0.1242157
## Run 16 stress 0.06459872
## ... Procrustes: rmse 0.0001186798 max resid 0.000232371
## ... Similar to previous best
## Run 17 stress 0.1160901
## Run 18 stress 0.09441759
## Run 19 stress 0.0645988
## ... Procrustes: rmse 0.0002110877 max resid 0.0004145088
## ... Similar to previous best
## Run 20 stress 0.06459881
## ... Procrustes: rmse 0.0002401664 max resid 0.0004689299
## ... Similar to previous best
## *** Best solution repeated 12 times
## Warning in postMDS(out$points, dis, plot = max(0, plot - 1), ...): skipping
## half-change scaling: too few points below threshold
NMDS_2$stress
## [1] 0.06459864
library("vegan")
library("ggplot2")
scores2 <-scores(NMDS_2, display="sites")
scores_df<- cbind(as.data.frame(scores2), Habitat = data_2_Waders$Habitat)
centroids2 <- aggregate(cbind(NMDS1, NMDS2) ~ Habitat, data = scores_df, FUN = mean)
seg2 <- merge(scores_df, setNames(centroids2, c('Habitat','oNMDS1','oNMDS2')),
by = 'Habitat', sort = FALSE)
ggplot(scores_df, aes(x = NMDS1, y = NMDS2, colour = Habitat))+
scale_color_manual(values=c("seagreen4", "olivedrab", "palegreen3","coral1",
"sienna3", "darkcyan", "cornflowerblue"))+
geom_segment(data = seg2,
mapping = aes(xend = oNMDS1, yend = oNMDS2)) +
geom_point(data = centroids2, size = 4) +
geom_point() +
geom_text(label= data_2_Waders$Habitat,
nudge_x = 0.015, nudge_y = 0.05,
check_overlap = F)+
ggtitle("NMDS To Represent Macroinvertebrate Assembleges
Across Sites Collected Instream")+
theme(plot.title = element_text(hjust = 0.5),
text = element_text(family = "Times New Roman"))
library(readxl)
Leaf_litter_weights_ <- read_excel("Leaf litter weights .xlsx",
sheet = "Sheet1")
View(Leaf_litter_weights_)
library(ggplot2)
ggplot(data=Leaf_litter_weights_, aes(x= Sample, y= `Percentage Weight Loss`,
fill= Sample))+
geom_bar(stat="identity", width=0.7)+
scale_fill_manual(values=c("seagreen3", "seagreen3", "seagreen3",
"seagreen3", "seagreen3", "seagreen3",
"palevioletred", "palevioletred", "palevioletred",
"palevioletred",
"palevioletred", "palevioletred"))+
theme(legend.position="none")+
ggtitle("Percentage Weight Loss of Leaf Litter Across Sites in Mimosa Creek, Brisbane Meanjin") +
xlab("Sites") + ylab("% Weight Loss")+
theme(text=element_text(family="Times New Roman"))