capture.output() has already considered withVisible(), and we do not need to redo it

This commit is contained in:
Yihui Xie
2014-05-16 14:12:50 -05:00
parent b00fbda1ae
commit a42f046ff8

View File

@@ -368,11 +368,7 @@ renderPrint <- function(expr, env=parent.frame(), quoted=FALSE, func=NULL) {
}
markRenderFunction(verbatimTextOutput, function() {
return(paste(capture.output({
result <- withVisible(func())
if (result$visible)
print(result$value)
}), collapse="\n"))
paste(capture.output(func()), collapse = "\n")
})
}