Learn R Programming

entcn (version 1.0.0)

translate: Translate English words into Chinese words

Description

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

Usage

translate(x)

Arguments

x

A English words or a vector made up of English words

Value

The Chinese words equivalent of English words

Examples

Run this code
# NOT RUN {
# Example-1
translate("English")

# Example-2
x <- c("father", "mother", "son")
translate(x)

# }

Run the code above in your browser using DataLab