Advertisement
Guest User

Untitled

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