我已經包含在我的boxplot
缺口至於下面的代碼:如何修改boxplot的這個凹槽錯誤?
> boxplot(dframe1$High.calcium..diet, dframe1$Low.calcium.diet, # The basic boxplot command
+ varwidth = FALSE, # width of boxes represents sample size
+ notch = TRUE, # add a notch indicating 95% confidence intervals
+ names = c("High Calcium diet", "Low Calcium diet"), # labels the different boxes
+ col=c("violet", "light green"), # colours the different boxes
+ xlab = "Diet", # adds an x-axis label
+ ylab = "parathyroid hormone per 100 ml blood", # adds a y-axis label
+ cex.lab = 1.6, # adjusts the size of the axis labels
+ cex.axis = 1.3, # adjusts the size of the axis numbering
+ las = 1)
Warning message:
In bxp(list(stats = c(12.7, 14.4, 16.2, 18.25, 23.1, 15.1, 40.2, :
some notches went outside hinges ('box'): maybe set notch=FALSE
>
不過,我收到警告如上,但我不希望設置notch
到FALSE
,因爲我想的槽口。我將如何解決這個問題?
這是與它去的數據:
High calcium diet Low calcium diet
14.5 52.7
18.2 44.4
15 125
14.3 66.4
25.7 23.3
17.3 88.3
23.1 38.8
16.2 42.9
12.7 15.1
18.3 41.6
13.2 53.2
我可能會通過尋找啓動在「盒子」的鉸鏈範圍內 –
@koekenbakker,我會張貼作爲答案。你也可以指出,如果OP不關心醜陋的缺口,只是想擺脫警告,他們可以使用'?suppressWarnings' ... –
這裏沒有什麼可以修復的,它只是告訴你一些缺口在箱子外面。但是沒有什麼不對,這只是你的數據產生的。 –