i have data frame which contains Quarter and Unique Customer ID columns what i want is plot a graph which will count the Unique customers by Quarter.
what i tried is
uniquegraph<-data.frame(uniqueCustomerdf)
> uniqueCustomer<-c(uniquegraph$Customer.Id)
> Quarter<-c(uniquegraph$Quarter)
> uniquegraphplot<-data.frame(uniqueCustomer=uniqueCustomer,Quarter=Quarter)
> ggplot(uniquegraphplot,aes(x=Quarter,y=uniqueCustomer)) + geom_bar(stat="identity")
and also i tried hist
hist(uniqueCustomer, plot=TRUE)
but here how to assign Quarter i am not getting
Here is my data
Quarter Customer.Id
2009 Q1 10025
2009 Q1 10096
2009 Q1 10062
2009 Q1 10030
2009 Q1 10037
2009 Q1 10078
2009 Q1 10032
2009 Q1 10243
2009 Q1 10052
2011 Q1 10019
2009 Q4 13710
2009 Q4 15310
2009 Q4 13814
2010 Q3 13210
2009 Q4 10143