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,
  ...
)

Arguments

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 base::prettyNum(), scales::label_number() or arabic2kansuji::arabic2kansuji_all().

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 {scales} package, 1.10 will be displayed.

Value

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.

Examples