search for: sweavegetdriv

Displaying 1 result from an estimated 1 matches for "sweavegetdriv".

Did you mean: sweavegetdriver
2010 Dec 14
1
embed Sweave driver in .Rnw file
...===================================================== --- src/library/utils/R/Sweave.R (revision 53846) +++ src/library/utils/R/Sweave.R (working copy) @@ -20,6 +20,16 @@ # We don't need srclines for code, but we do need it for text, and it's easiest # to just keep it for everything. +SweaveGetDriver <- function(file){ + txt <- readLines(file) + line <- grep( "\\SweaveDriver", txt, value = TRUE ) + if( length(line) ){ + txt <- sub( "^.*\\SweaveDriver[{](.*)[}]", "\\1", line[1L] ) + driver <- try( eval( parse( text = txt ) ),...