04pallav
9/13/2017 - 9:22 PM

cut and label

cut and label

cut(splitme,breaks=vectorwithsplits)

example
df3$targetbinned=cut(df3$target,breaks=c(-1:7,Inf),labels=c(as.character(0:7),'7+'))