-4

I have the following dataset of credit history. german credit history

How to plot the age group (applied for loan) for each gender using ggplot2.

Thanks in advance.

Atul
  • 45
  • 1
  • 2
  • 7
  • 4
    Please read the info about [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and how to give a [reproducible example](http://stackoverflow.com/questions/5963269). This will make it much easier for others to help you. – zx8754 Jul 06 '17 at 11:31

1 Answers1

2
library(ggplot)
german_credit$Sex <- as.factor(german_credit$Sex)
ggplot(german_credit, aes(x = Age)) + geom_histogram() + facet_wrap(~Sex)
Kalees Waran
  • 659
  • 6
  • 13