開始使用免費開始

直方圖

這個練習將示範如何使用 geom_histogram() 幾何物件,為鮑魚的 shellWeight 繪製直方圖,並自訂長條邊框與填色,以及軸標籤與圖標題。請記得先載入 ggplot2 套件才能使用這些函式。

abalone 資料集與 dplyr 套件已為你載入。

本練習屬於課程

給 SAS 使用者的 R

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Load ggplot2 package
library(___)

# Make a histogram of shellWeight for the abalones
ggplot(___, aes(___)) + 
	___
編輯並執行程式碼