入力された数値に関して万進法 (中数) での日本語単位を返す関数.

kurai_ja(num, remove_ichi = TRUE, scipen = 108)

Arguments

num

A numeric value or a numeric vector. Smaller numbers after decimal point are rounded.

remove_ichi

Not print '一' when TRUE (default).

scipen

An integer. A penalty to be applied when deciding to print numeric values in fixed or exponential notation. Default: 108.

Value

A character vector of Kanji.

Details

Decimal numbers not yet supported such that 0.1 and 0.00001 will be converted to "" (default) or '一' (if remove_ichi = FALSE).

Examples

kurai_ja(c(1, 23, 456, 7890, 98765, 4e32, 1e+99, -1234567890)) 
#> Note that decimal portions are rounded off.
#> [1] ""          "十"        "百"        "千"        "万"        "溝"       
#> [7] "桁数: 100" "十億"     
kurai_ja(c(0, 1, 0.05), remove_ichi = FALSE) 
#> Note that decimal portions are rounded off.
#> [1] "一" "一" "一"