translate: Translate English words into Chinese, or translate Chinese...

Description Usage Arguments Value Examples

View source: R/translate.R

Description

When you pass in a vector consisting of an English or Chinese words, this function will calls the Youdao translation open API for R to return the corresponding type of Chinese or English representation.

Usage

1

Arguments

x

A vector made up of English or Chinese words

Value

A vector made up of Chinese or English words

Examples

1
2
3
4
5
6
# Example-1
translate("apple")

# Example-2
x <- c("apple", "banana", "pear", "I love you")
translate(x)

ecce documentation built on Jan. 18, 2022, 1:10 a.m.