title: How can I get quantile label names in cut function?
body: <p>I have this piece of code, </p>
  
  <pre><code>breaks=quantile(foo1$mnqtp, probs=seq(0,1, by=0.2))
  </code></pre>
  
  <p>Try 1</p>
  
  <pre><code>foo1$quantile &lt;- with(foo1, cut(mnqtp, breaks=quantile(mnqtp, probs=seq(0,1, by=0.2)),
                              labels=c("0%","20%","40%","60%","80%"),
                              include.lowest=TRUE))
  </code></pre>
  
  <p>Try 2</p>
  
  <pre><code>foo1$quantile &lt;- with(foo1, cut(mnqtp, breaks),labels=names(breaks),include.lowest=TRUE)
  </code></pre>
  
  <p>All I want is to rename the labels automatically to 90%, 100%, 20% etc based on the quantile. I can do it manually using Try 1, but I would like to have an automatic solution to this. Could you please help?</p>