Format numbers in charts as a percentage

Possible duplicate:
How to format a percentage number in R?

These should be newbie questions, but how do I format numbers in charts (e.g. PerformanceSummary in PerformanceAnalytics) as a percentage? The data I use is in the 0.04 format, etc. Everything is working fine, except that the charts display percentages.

Thanks in advance

EDIT:

Here's how I do it now (with standard data for simplicity):

library("PerformanceAnalytics")
data(managers)
charts.PerformanceSummary(managers)

I put it here when I go to a search engine for my own labels.

+5
source share
2 answers

If I miss something, I don’t think this is a question for beginners.

( : , , . , , , - .)

:

  • y, .. yaxt="n"
  • , , , . seq
  • sprintf round

:

set.seed(1)
x <- runif(10)
plot(x, type="h", yaxt="n")
yLabels <- seq(0.2, 0.8, 0.2)
axis(2, at=yLabels, labels=sprintf(round(100*yLabels), fmt="%2.2f%%"), las=1)

:

enter image description here

+9

: " ".

. , -, , - Y , , - , .

, - , 100, "%" .

, R , . , . .

, Excel SPSS, " ". .

0

All Articles