Takes an R expression and converts it to English by matching recognised symbols with an opinionated list of English 'translations'.
translate_string(expression, speak = TRUE, function_call_end = "of ")
translate(expression, speak = TRUE, function_call_end = "of ")
An R expression (bare if translate()
, quoted if
translate_string()
).
Logical. Do you want your system to try and say the English expression? macOS only. Requires speakers on your machine.
Character, what should be added after a function
call, e.g. setting this parameter to "of", this function translates
summary(x)
to "summary of x open paren x close paren".
An r2eng object, which is a list with three elements: the input R expression, the 'translated' English expression and a data frame showing the translation of each R element.
if (FALSE) {
translate(variable <- 1)
}