Professional Documents
Culture Documents
(5,6일차)
(5,6일차)
(5,6일차)
ggplot(data=mpg,aes(x=displ,y=hwy))+
geom_point()+
xlim(3,6)+
ylim(10,30)
library(dplyr)
ggplot(data=df_mpg,aes(x=drv,y=mean_hwy))+geom_col()
ggplot(data=df_mpg,aes(x=reorder(drv,-mean_hwy),y=mean_hwy))+geom_col()
ggplot(data=mpg,aes(x=drv))+geom_bar()
ggplot(data=mpg,aes(x=hwy))+geom_bar()
ggplot(data=economics,aes(x=date,y=unemploy))+geom_line()
ggplot(data=mpg,aes(x=drv,y=hwy))+geom_boxplot()
install.packages("foreign")
library(foreign)
library(dplyr)
library(ggplot2)
library(readxl)
head(welfare)
tail(welfare)
View(welfare)
dim(welfare)
str(welfare)
summary(welfare)
class(welfare$sex)
table(welfare$sex)
class(welfare$income)
summary(welfare$income)
qplot(welfare$income)
qplot(welfare$income)+xlim(0,1000)
summary(welfare$income)
welfare$income <- ifelse(welfare$income %in% c(0,9999), NA, welfare$income)
table(is.na(welfare$income))
ggplot(data=sex_income, aes(x=sex,y=mean_income))+geom_col()
class(welfare$birth)
summary(welfare$birth)
qplot(welfare$birth)
summary(welfare$birth)
table(is.na(welfare$birth))
welfare$birth <- ifelse(welfare$birth==9999, NA, welfare$birth)
table(is.na(welfare$birth))