Skip to content
Prev 176485 / 398503 Next

change default output size when using Sweave

Mark Heckmann wrote:
If your documents are more or less fixed, you could add an extra 
preprocessor step before running Sweave.  For example, create mydoc.in 
containing

<<fig=TRUE, height=@SIZE@>>=
...
@

and then use sed or some other text substitution utility (even R, by 
reading your whole document into an R variable) to substitute the 
desired size for
the string @SIZE at .  It's clunky, but it sounds as though you're 
interested in producing standardized documents regularly, so it may be 
acceptable.

Duncan Murdoch