Data

자료 출처는 통계청 보도자료.

hh.econ.11 <- matrix(c(1196.7, 1260.5, 961.3, 2545.4, 1864.6, 2113.9, 3512.5, 2325.1, 2914.9, 4621.3, 2791.7, 3762.9, 7537.0, 3654.6, 6144.2), 3)
hh.econ.11
##        [,1]   [,2]   [,3]   [,4]   [,5]
## [1,] 1196.7 2545.4 3512.5 4621.3 7537.0
## [2,] 1260.5 1864.6 2325.1 2791.7 3654.6
## [3,]  961.3 2113.9 2914.9 3762.9 6144.2
rownames(hh.econ.11) <- c("소득", "소비지출", "처분가능소득")
colnames(hh.econ.11) <- paste(1:5, "분위", sep = "")
kable(hh.econ.11)
1분위 2분위 3분위 4분위 5분위
소득 1196.7 2545.4 3512.5 4621.3 7537.0
소비지출 1260.5 1864.6 2325.1 2791.7 3654.6
처분가능소득 961.3 2113.9 2914.9 3762.9 6144.2
hh.econ.11.2 <- hh.econ.11[c(1, 3, 2), ]
kable(hh.econ.11.2)
1분위 2분위 3분위 4분위 5분위
소득 1196.7 2545.4 3512.5 4621.3 7537.0
처분가능소득 961.3 2113.9 2914.9 3762.9 6144.2
소비지출 1260.5 1864.6 2325.1 2791.7 3654.6

Bar Plots

par(family = "HCR Dotum LVT")
barplot(hh.econ.11)

barplot(hh.econ.11, beside = TRUE)

barplot(hh.econ.11.2, beside = TRUE)

Bar Plots

par(family = "HCR Dotum LVT")
barplot(hh.econ.11.2, beside = TRUE)

Axes and Titles

par(family = "HCR Dotum LVT")
barplot(hh.econ.11.2, beside = TRUE, yaxt = "n", col = gray(c(1/6, 1/2, 5/6)))
axis(side = 2, at = seq(0, 7000, by = 1000), labels = 0:7, las=1)
legend("topleft", inset = 0.1, legend = rownames(hh.econ.11.2), fill = gray(c(1/6, 1/2, 5/6)))
title(main = "2011년 가계수지", xlab = "소득 5분위", ylab = "금액(단위, 백만원)")