ÃÑ 327ÆäÀÌÁö
73ÆäÀÌÁö º»¹®½ÃÀÛ
¥°. R & R-Studio
10.3. Áý´Ü º¯¼ö°¡ Á¸ÀçÇÏ´Â °æ¿ì
¸®±×(National,American)ŸÀھȟ¼ö
Áý´Üº° Æò±ÕÀ» ±¸ÇÑ´Ù. À̸¦ ÀÌ¿ëÇÏ¿© ¼öÆò¼±À» ±×¸°´Ù. bins= ¸·´ë °³¼ö,
theme(legend.position=¡®right') : ¹ü·Ê Ç¥½Ã¸¦ ±×·¡ÇÁ ¿À¸¥ÂÊ¿¡ À§Ä¡
CODE
library(plyr)
mu
head(mu)
ggplot(baseball,aes(x=Hits,color=League)) +
geom_histogram(?ll="white",position='dodge',bins=15)+
geom_vline(data=mu, aes(xintercept=grp.mean, color=League),
linetype="dashed")+
theme(legend.position='right') +
ggtitle('PDF of Hits by League') +
theme_bw()
63
10.3. Áý´Ü º¯¼ö°¡ Á¸ÀçÇÏ´Â °æ¿ì
¸®±×(National,American)ŸÀھȟ¼ö
Áý´Üº° Æò±ÕÀ» ±¸ÇÑ´Ù. À̸¦ ÀÌ¿ëÇÏ¿© ¼öÆò¼±À» ±×¸°´Ù. bins= ¸·´ë °³¼ö,
theme(legend.position=¡®right') : ¹ü·Ê Ç¥½Ã¸¦ ±×·¡ÇÁ ¿À¸¥ÂÊ¿¡ À§Ä¡
CODE
library(plyr)
mu
head(mu)
ggplot(baseball,aes(x=Hits,color=League)) +
geom_histogram(?ll="white",position='dodge',bins=15)+
geom_vline(data=mu, aes(xintercept=grp.mean, color=League),
linetype="dashed")+
theme(legend.position='right') +
ggtitle('PDF of Hits by League') +
theme_bw()
63
73ÆäÀÌÁö º»¹®³¡
¸Þ´º
ÇöÀç Æ÷Ä¿½ºÀÇ ¾Æ·¡³»¿ëµéÀº µ¿ÀÏÇÑ ÄÁÅÙÃ÷¸¦ °¡Áö°í ÆäÀÌÁö³Ñ±è È¿°ú¹× ½Ã°¢Àû È¿°ú¸¦ Á¦°øÇÏ´Â ÆäÀÌÁöÀ̹ǷΠ½ºÅ©¸°¸®´õ »ç¿ëÀÚ´Â ¿©±â±îÁö¸¸ ³¶µ¶ÇϽðí À§ÀÇ ÆäÀÌÁöÀ̵¿ ¸µÅ©¸¦ »ç¿ëÇÏ¿© ´ÙÀ½ÆäÀÌÁö·Î À̵¿ÇϽñ⠹ٶø´Ï´Ù.