I want to know if it is possible to make the table output in this R package a % instead of a numeric.
table.AnnualizedReturns(indOver, Rf=0)
SP500
Annualized Return 0.0732
Annualized Std Dev 0.1951
Annualized Sharpe (Rf=0%) 0.3752
So the 1st one 0.0732 I would like to see as 0.07%
The return value from that function is a data frame, so the question is how to make a column of a data frame print with a percentage sign.
Reproducible example follows.
Now we define a new class and a format function that displays with a percent sign:
And now, as if by magic:
The underlying values have not been changed:
they are just in a vector of this new class.