I need to apply cut on a continuous variable to show it with a Brewer color scale in ggplot2, as in Setting breakpoints for data with scale_fill_brewer() function i
cut
Use gsub with some regex after multiplying your original data by 100:
gsub
gsub("([0-9.]+)","\\1%",levels(cut(x*100,breaks=10))) [1] "(0.449%,10.4%]" "(10.4%,20.3%]" "(20.3%,30.2%]" "(30.2%,40.2%]" "(40.2%,50.1%]" "(50.1%,60%]" "(60%,69.9%]" "(69.9%,79.9%]" "(79.9%,89.8%]" "(89.8%,99.7%]"