R/bcSweave.R

Defines functions bcSweave

Documented in bcSweave

bcSweave <- function(f) {
  out  <- sub('.Rnw','.tex',f)
  if(out==f)
    stop("Expecting filename with '.Rnw' extension.")
  Sweave(f, eps=FALSE, output=out)

  ## This is for the sessionInfo stuff
  tmp  <- tempfile()
  Sweave("../sessionInfo.Rnw", output=tmp)
  con <- file(out, open="at")
  writeLines(readLines(tmp), con)
  close(con)
}

Try the RbcBook1 package in your browser

Any scripts or data that you put into this service are public.

RbcBook1 documentation built on Nov. 8, 2020, 7:18 p.m.