Quote arguments to do.call() for nicer stack traces. Closes #1851

This commit is contained in:
Winston Chang
2017-09-26 14:23:38 -05:00
parent 48fd869c71
commit 213ee7be13
3 changed files with 6 additions and 3 deletions

View File

@@ -232,7 +232,7 @@ renderPlot <- function(expr, width='auto', height='auto', res=72, ...,
# renderPlot, and by the ..stacktraceon.. in plotFunc where ggplot objects
# are printed
outfile <- ..stacktraceoff..(
do.call(plotPNG, c(plotFunc, width=dims$width*pixelratio,
do.call("plotPNG", c(quote(plotFunc), width=dims$width*pixelratio,
height=dims$height*pixelratio, res=res*pixelratio, args))
)
on.exit(unlink(outfile))