Don't print NULL to the console during renderPrint

This commit is contained in:
Joe Cheng
2014-05-21 19:28:28 -07:00
parent af3c4f84b6
commit 343ca12c6f

View File

@@ -120,8 +120,11 @@ renderPlot <- function(expr, width='auto', height='auto', res=72, ...,
plotFunc <- function() {
# Actually perform the plotting
result <- withVisible(func())
if (result$visible)
print(result$value)
if (result$visible) {
# Use capture.output to squelch printing to the actual console; we
# are only interested in plot output
capture.output(print(result$value))
}
# Now capture some graphics device info before we close it
usrCoords <- par('usr')