直方圖(Histogram)常用於數據分布和分類的呈現功能。在R語言中,利用hist指令即可繪製,同時亦可輸出數據分布結果,語法說明如下。
Histograms
Description:
The generic function hist computes a histogram of the given data values.
hist(x, breaks = "Sturges",
main = paste("Histogram of" , xname),
xlim = range(breaks), ylim = NULL,
xlab = xname, ylab,
axes = TRUE, plot = TRUE, labels = FALSE)