Skip to content

Commit

Permalink
Just call RweaveEvalWithOpt if caching is turned off
Browse files Browse the repository at this point in the history
  • Loading branch information
rdpeng committed Jun 29, 2011
1 parent 80edc0f commit 6bd411d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions R/SweaveCache.R
Expand Up @@ -209,12 +209,7 @@ cacheSweaveEvalWithOpt <- function (expr, options) {
else {
## If caching is turned off, just evaluate the expression
## in the global environment
res <- try(withVisible(eval(expr, .GlobalEnv)),
silent=TRUE)
if(inherits(res, "try-error"))
return(res)
if(options$print | (options$term & res$visible))
print(res$value)
res <- utils::RweaveEvalWithOpt(expr, options)
}
res
}
Expand Down

0 comments on commit 6bd411d

Please sign in to comment.