我試圖設置一個條形圖來比較特定化合物的控制和實驗樣本。該數據集被稱爲「hydrocarbon3」,幷包含以下信息:R中的條形圖幫助
Exp. Contr.
c12 89 49
c17 79 30
c26 78 35
c42 63 3
pris 0.5 0.8
phy 0.5 0.9
nap 87 48
nap1 83 44
nap2 78 44
nap3 73 20
acen1 81 50
acen2 86 46
fluor 83 11
fluor1 68 13
fluor2 79 17
dibe 65 7
dibe1 67 6
dibe2 56 10
phen 82 13
phen1 70 12
phen2 65 15
phen3 53 14
fluro 62 9
pyren 48 11
pyren1 34 10
pyren2 19 8
chrys 22 3
chrys1 21 3
chrys2 21 3
當我創建與式的條形圖:
barplot(as.matrix(hydrocarbon3),
main=c("Fig 1. Change in concentrations of different hydrocarbon compounds\nin sediments with and without the presence of bacteria after 21 days"),
beside=TRUE,
xlab="Oiled sediment samples collected at 21 days",
space=c(0,2),
ylab="% loss in concentration relative to day 0")
我接收該圖中,但我所需要的控制和每種化學物質的實驗樣品彼此相鄰允許進行更準確的比較,而不是左側的實驗樣品和右側的對照樣品:有沒有辦法在R上進行校正?