R/vignette.R
inSweave.Rd
Tells if the current code is being executed within a Sweave document.
inSweave()
TRUE or FALSE
TRUE
FALSE
# Not in a Sweave document inSweave() #> [1] FALSE # Within a Sweave document