Format labels produced by cut() with thousands separator

时间:2017-12-18 07:07:17

标签: r

I used the cut function to bin my numbers. Is there a way to apply comma separator, preferably with thousands separator so the labels won't come out as exponential?

dummy data

df<-df_RFM_complete %>% mutate(monetary.class=cut(monetary,breaks=c(seq(25,10000,150),359086),format_fun = format, sep = ", ")) %>% group_by(monetary.class) %>% summarise(count=n())

0 个答案:

没有答案