Description Usage Arguments Details Value Author(s) References See Also Examples
Format a numeric vector so that decimal mark is a constant distance from the end or beginning of each element.
1 2 | align.decimal(x, decimal.mark = ".", ...)
padded(x,width = 4,...)
|
x |
numeric |
decimal.mark |
character indicating decimal |
width |
numeric indicating total digits |
... |
ignored |
for align.decimal
, each element is formatted separately using
prettyNum
, then the character results are
padded with spaces on the right, so that the decimals
align. Whole numbers without the decimal mark get an
extra space in its place.
For padded
, x (numeric) is formatted with zero decimal places, no decimal, and enough
leading zeros to ensure width width
.
character
Tim Bergsma
http://metrumrg.googlecode.com
tabular.data.frame
1 2 | align.decimal(c(.12, 1.2, 12.0))
padded(c(1,10,100,1000),5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.