Re: [R] percentage in R

From: Roland Rau <>
Date: Thu, 21 Jun 2007 17:05:02 -0400 wrote:
> Hi There,
> How to display a number in the formation of percentage?
> For example, a=0.25, how to display 25%?

if you write 'how to display' I guess you mean in a plot?

a <- 0.25
plot(0:10, 0:10, type="n")
text(x=5, y=5, labels=paste(round(a*100,0), "%", sep=""))

does this help?
Roland mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 21 Jun 2007 - 21:13:51 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 21 Jun 2007 - 21:32:38 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.