View source: R/label-kansuji.R
label_kansuji | R Documentation |
Automatically scales and labels with the Kansuji Myriad Scale (e.g. "Man",
"Oku", etc).
Use label_kansuji()
converts the label value to either Kansuji value or a
mixture of Arabic numerals and the Kansuji Scales for ten thousands,
billions, and ten quadrillions.
Use label_kansuji_suffix()
converts the label value to an Arabic numeral
followed by the Kansuji Scale with the suffix.
label_kansuji(
unit = NULL,
sep = "",
prefix = "",
big.mark = "",
number = c("arabic", "kansuji"),
...
)
label_kansuji_suffix(
accuracy = 1,
unit = NULL,
sep = NULL,
prefix = "",
big.mark = "",
significant.digits = FALSE,
...
)
unit |
Optional units specifier. |
sep |
Separator between number and Kansuji unit. |
prefix |
Symbols to display before value. |
big.mark |
Character used between every 3 digits to separate thousands. |
number |
If Number is arabic, it will return a mixture of Arabic and the Kansuji Myriad Scale; if Kansuji, it will return only Kansuji numerals. |
... |
Other arguments passed on to |
accuracy |
A number to round to. Use (e.g.) 0.01 to show 2 decimal places of precision. |
significant.digits |
Determines whether or not the value of accurary is
valid as a significant figure with a decimal point. The default is FALSE, in
which case if accurary is 2 and the value is 1.10, 1.1 will be displayed,
but if TRUE and installed |
All label_()
functions return a "labelling" function, i.e. a function
that takes a vector x and returns a character vector of length(x) giving a
label for each input value.
library("scales") demo_continuous(c(1, 1e9), label = label_kansuji()) demo_continuous(c(1, 1e9), label = label_kansuji_suffix())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.