library(ggplot2) ##loading packages
library(ggpubr)
library(rstatix)
##
## Attaching package: 'rstatix'
## The following object is masked from 'package:stats':
##
## filter
Col <- read.csv("C:/Users/prana/OneDrive/Desktop/COLONIZATION%.csv") ##uploading data
Col
## Treatments Mycorrhization
## 1 AMF 60.62
## 2 AMF 61.32
## 3 AMF 62.63
## 4 AMF 66.84
## 5 AMF 72.11
## 6 AMF + ΔnifD 77.89
## 7 AMF + ΔnifD 84.47
## 8 AMF + ΔnifD 89.47
## 9 AMF + ΔnifD 93.68
## 10 AMF + ΔnifD 91.58
## 11 AMF + ΔnifL:km 90.53
## 12 AMF + ΔnifL:km 80.79
## 13 AMF + ΔnifL:km 90.26
## 14 AMF + ΔnifL:km 92.63
## 15 AMF + ΔnifL:km 87.37
## 16 AMF + WT 92.37
## 17 AMF + WT 92.63
## 18 AMF + WT 90.53
## 19 AMF + WT 85.79
## 20 AMF + WT 86.58
##plotting
plot <- ggplot(Col, aes(x = Treatments, y = Mycorrhization)) +labs(y = "Mycorrhization%") +
geom_boxplot()+ylim(50,120) +
geom_point(position = position_dodge(width = 0.8)) + ##geom points
theme(axis.title = element_text(family = "Times",
size = 12, face = "bold", colour = "gray7")) +labs(x = NULL) + theme(axis.title = element_text(colour = "gray0"),
axis.text = element_text(family = "Times",
size = 12, face = "bold.italic",
colour = "gray10"), axis.text.x = element_text(family = "Times",
size = 12, colour = "gray10")) + theme(axis.text = element_text(face = "bold"))
plot
## Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family
## not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
##adding p-values manually
plot +
annotate("text", x = 2, y = 100, label = "****") +
annotate("text", x = 3, y = 100, label = "***") +
annotate("text", x = 4, y = 100, label = "****")
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.