I am using ggplot2 library to produce box plots for AccountBalance, MonthlyExpenses, CreditScore and Age segmented by approval (variable “Approved”). I have not had to segment a box plot and am coming up short when researching the topic. These are the list of variables listed in R:
crx$AccountBalance <- as.numeric(crx$AccountBalance)
crx$MonthlyExpenses <- as.integer(crx$MonthlyExpenses)
crx$CreditScore <- as.numeric(crx$CreditScore)
crx$Age <- as.numeric(crx$Age)
crx$Approved <- as.factor(crx$Approved)
I have created the box plots but don't know how to segment by approval (variable “Approved”). Could some one please advise me? Here are my box plot codes:
#AccountBalance Boxplot
AB <- crx$AccountBalance
boxplot(AB)
#MonthlyExpenses Boxplot
ME <- crx$MonthlyExpenses
boxplot(ME)
#CreditScore Boxplot
CS <- crx$CreditScore
boxplot(CS)
#Age Boxplot
Age <- crx$Age
boxplot(Age)
Thank you for your support, it's been a tremendous help