arabic2kansuji {arabic2kansuji}R Documentation

Convert Arabic numerals to Kansuji

Description

Converts a given Arabic numerals to Kansuji numerical figures that written in Chinese characters (in other words, Chinese numeral). 'arabic2kansuji()' function can also convert Arabic numerals in the string to kansuji. 'arabic2kansuji_num()' function can convert a vector of only one Arabic numerals to Kansuji. Use 'arabic2kansuji_all()' can calculate and convert Arabic numerals to Kansuji while retaining the original non-Arabic numeral string.

Usage

arabic2kansuji(str, zero = c("rei", "zero"), width = c("half", "full", "all"))

arabic2kansuji_num(num, ...)

arabic2kansuji_all(str, widths = c("half", "all"), ...)

Arguments

str

Input vector.

zero

Selects whether 0 should be zero like o ("rei") or zero like have rain crown ("zero") when Arabic numerals are converted to kansuji.

width

Selects whether you want to convert Arabic numbers, only half-width numbers ("half") or only full-width numbers ("full") or both half-width and full-width numbers ("all") when converting Arabic numbers to kansuji.

num

Input only number. Accept more than one number.

...

Other arguments to carry over to 'arabic2kansuji()'.

widths

Selects whether you want to convert Arabic numbers, only half-width numbers ("half") or both half-width and full-width numbers ("all") when converting Arabic numbers to kansuji.

Value

a character.

Examples

arabic2kansuji(2020)
arabic2kansuji(2020, zero = "zero")
arabic2kansuji(c(2019, 2020, 2021))
arabic2kansuji_num(2020)
arabic2kansuji_num((c(2019, 2020, 2021)))
arabic2kansuji_all("This year is 2020, next year is 2021.")

[Package arabic2kansuji version 0.1.1 Index]