Skip to contents

`get_pinyin()` returns the pinyin of input Chinese characters. Both Simplified Chinese and Traditional Chinese are supported.

Usage

pinyin(char)

Arguments

char

A character vector of Chinese characters.

Value

A character vector with the same length as input `char`. The returned integer vector is always named using input `char`.

Note

Currently, polyphonics are not supported.

Examples

pinyin(c("平安", "行"))
#>      平安        行 
#> "pínɡ ān"    "xíng"