-
heatmap with tidyverse packageR 2018. 8. 3. 14:05
tidyverse 패키지를 이용하여 두 개의 질적 자료(범주형 자료)에 대한 heatmap를 다음과 같이 작성할 수 있다.
install.packages("tidyverse")
library(tidyverse)
diamonds %>%
dplyr::count(cut, color) %>%
ggplot2::ggplot(mapping = aes(x = cut, y = color)) +
geom_tile(mapping = aes(fill = n))[출처] R for Data Science, Hadley Wickham & Garrett Grolemund, O'REILLY, p100~101
'R' 카테고리의 다른 글
Patterns (0) 2018.08.03 boxplot with tidyverse package (0) 2018.08.03 tableHTML::tableHTML() (0) 2018.08.03 탐색적 자료 분석에서 해야 하는 두 개의 질문 (0) 2018.08.02 coord_quickmap() (0) 2018.08.01