
R | ggplot2 | Histogram
·
R/ggplot2
히스토그램은 막대그래프와 유사하지만 연속형 변수를 시각화 한다는 점에서 차이가 있다. ggplot2 패키지에서는 geom_histogram()로 히스토그램을 시각화 할 수 있음. geom_histogram( mapping = NULL, data = NULL, stat = "bin", position = "stack", ..., binwidth = NULL, bins = NULL, na.rm = FALSE, orientation = NA, show.legend = NA, inherit.aes = TRUE ) · binwidth: X축을 나누는 bin의 너비 설정, 숫자벡터를 사용할 수 있다. (bin과 binwidth는 동시에 사용될 수 없다) · bins: X축을 나누는 bin의 개수 설정 00. 데이터..