---
# System prepended metadata

title: 繪圖應用：抑菌率運算
tags: [R教學, 基礎教學]

---

# 繪圖應用：抑菌率運算
###### tags: `R教學` `基礎教學`
`

練習檔案：[MGI.csv](https://drive.google.com/file/d/1tLjeErOkHxSga_P1nywU1DzREwRw5kZ8/view?usp=sharing)

```r=
setwd(choose.dir())

##讀取資料##
Fungi <- read.csv("MGI.csv", head=T)
yeast <- Fungi[,2:4]
yeast[yeast<0] <- 0
Fungi_inhibition <- cbind(Fungi = Fungi$Fungi, 
                          yeast+0.00000001)

##萃取JYC517的平均值和標準差##
tapply (Fungi_inhibition$JYC517, Fungi_inhibition$Fungi, mean)
tapply (Fungi_inhibition$JYC517, Fungi_inhibition$Fungi, sd)

##繪圖##
boxplot(JYC517 ~ Fungi, 
        data = Fungi_inhibition)

plot(JYC517~as.factor(Fungi), 
       data=Fungi_inhibition, las=1, ylim=c(0,1))

points(JYC517~as.numeric(as.factor(Fungi)), 
     data=Fungi_inhibition, las=1, ylim=c(0,1))

boxplot(JYC517 ~ Fungi, 
        data = Fungi_inhibition, add=T)

```

