Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Changing Marital status numerical values to facors
- married_vec=c(1,2,3)
- married_desc=c("married","single","others")
- credi_tbl_temp$MARRIAGE=factor(x=credit_tbl$MARRIAGE,levels=married_vec,labels=married_desc)
- # Crearing Marrital Status bar chart with fill
- m=ggplot(data = credi_tbl_temp, aes(x = default.payment.next.month)) +
- geom_bar(aes (fill = MARRIAGE), position = "fill") + ggtitle("Marital Status of Default Vs. Non Default")+ xlab("")
- m
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement