Turn unevaluated expressions into character strings.
deparse(expr, width.cutoff = 60L,
backtick = mode(expr) %in% c("call", "expression", "(", "function"),
control = c("keepNA", "keepInteger", "niceNames", "showAttributes"),
nlines = -1L)
| Parameter | Description |
|---|---|
expr |
any R expression. |
width.cutoff |
integer in \([20, 500]\) determining the cutoff (in bytes) at which line-breaking is tried. |
backtick |
logical indicating whether symbolic names should be enclosed in backticks if they do not follow the standard syntax. |
control |
character vector (or NULL) of deparsing options. See .deparseOpts. |
nlines |
integer: the maximum number of lines to produce. Negative values indicate no limit. |
# NOT RUN {
require(stats); require(graphics)
deparse(args(lm))
deparse(args(lm), width = 500)
myplot <-
function(x, y) {
plot(x, y, xlab = deparse(substitute(x)),
ylab = deparse(substitute(y)))
}
e <- quote(`foo bar`)
deparse(e)
deparse(e, backtick = TRUE)
e <- quote(`foo bar`+1)
deparse(e)
deparse(e, control = "all") # wraps it w/ quote( . )
# }