n_ab_p1 <- c(33.77, 24.3, 35.28)
n_ab_p2 <- c(37.04, 21.69, 35.43)
n_ab_p3 <- c(42.61, 21.61, 31.72)
s_ab_p1 <- c(41.88, 65.49, 68.5, 67.9, 70.34, 60.88, 60.17, 65.5, 66)
s_ab_p2 <- c(59.6, 60.7, 49.02, 61.23, 58.02, 55.33, 58.12, 56.73, 62.22)
s_ab_p3 <- c(64.36, 61.6, 59.84, 62.63, 61.75, 60.72, 56.62, 52.21, 60.94)
n_at_p1 <- c(26.63, 36.07, 26.17)
n_at_p2 <- c(26.49, 24.81, 25.25)
n_at_p3 <- c(24.22, 22.53, 21.95)
s_at_p1 <- c(61.57, 61.47, 68.6, 66.46, 67.67, 65.55, 66.58, 67.68, 64.5)
s_at_p2 <- c(56.72, 54.86, 63.24, 54.4, 36.61, 54.78, 53.45, 61.4, 42.6)
s_at_p3 <- c(57.15, 55.23, 55.49, 56.85, 53.25, 53.57, 57.45, 59.2, 54.03)
hist(s_ab_p1, xlim = c(40, 75))
hist(s_ab_p2, xlim = c(40, 75))
hist(s_ab_p3, xlim = c(40, 75))
s_ab_p1_ <- s_ab_p1[c(2, 4:9)] #2,4~9列目を取り出している
s_ab_p2_ <- s_ab_p2[c(2, 4:9)]
s_ab_p3_ <- s_ab_p3[c(2, 4:9)]
s_ab_p1_
## [1] 65.49 67.90 70.34 60.88 60.17 65.50 66.00
s_ab_p2_
## [1] 60.70 61.23 58.02 55.33 58.12 56.73 62.22
s_ab_p3_
## [1] 61.60 62.63 61.75 60.72 56.62 52.21 60.94
hist(s_at_p1, xlim = c(40, 75))
hist(s_at_p2, xlim = c(40, 75))
hist(s_at_p3, xlim = c(40, 75))
s_at_p1_ <- s_at_p1[c(1:4, 6:7)] #2,4~9列目を取り出している
s_at_p2_ <- s_at_p2[c(1:4, 6:7)]
s_at_p3_ <- s_at_p3[c(1:4, 6:7)]
s_at_p1_
## [1] 61.57 61.47 68.60 66.46 65.55 66.58
s_at_p2_
## [1] 56.72 54.86 63.24 54.40 54.78 53.45
s_at_p3_
## [1] 57.15 55.23 55.49 56.85 53.57 57.45
m_s_ab_p1 <- mean(s_ab_p1_)
m_s_ab_p2 <- mean(s_ab_p2_)
m_s_ab_p3 <- mean(s_ab_p3_)
m_s_at_p1 <- mean(s_at_p1_)
m_s_at_p2 <- mean(s_at_p2_)
m_s_at_p3 <- mean(s_at_p3_)
n <- 24.21
sn_ab_p1 <- m_s_ab_p1 - n
sn_ab_p2 <- m_s_ab_p2 - n
sn_ab_p3 <- m_s_ab_p3 - n
sn_at_p1 <- m_s_at_p1 - n
sn_at_p2 <- m_s_at_p2 - n
sn_at_p3 <- m_s_at_p3 - n
p <- c(1, 2, 3)
sn_ab <- rbind(sn_ab_p1, sn_ab_p2, sn_ab_p3)
sn_at <- rbind(sn_at_p1, sn_at_p2, sn_at_p3)
xname <- c("Front", "Middle", "Rearward") # x軸の目盛りに振る文字
plot(sn_ab, xlim = c(1, 3), ylim = c(30, 45), type = "o", pch = 3, lty = 3,
xaxp = c(1, 3, 2), yaxp = c(30, 45, 3), xlab = "", ylab = "", axes = F)
par(new = T)
plot(sn_at, xlim = c(1, 3), ylim = c(30, 45), type = "o", pch = 4, lty = 1,
axes = F, xaxp = c(1, 3, 2), yaxp = c(30, 45, 3), xlab = "Position", ylab = "SN ratio",
main = "Trial_1")
axis(side = 1, at = p, labels = xname)
axis(side = 2, at = c(30, 35, 40, 45))
legend("topright", c("Vacant", "Full"), lty = c(3, 1), pch = c(3, 4), col = c(1,
1), bty = "n", bg = "n")