List,

I would like to set a variable to hold, say, the size of my plots in a
Sweave document.  i.e. something like the following in my '.Rnw' file:

==============================================================================
smallPlotSize = 4

<<fig1, echo=false, results=hide, height=smallPlotSize, width=smallPlotSize,
fig=true>>=
dat <- read.table("
http://www.stanford.edu/~xing/statfinbook/_BookData/Chap05/q_us_gdp.txt",
skip=2, header=T)

GDP <- ts(data=dat$VALUE, start=c(1947,1), frequency=4)

acf(GDP, type="correlation", main= "ACF of US GDP")
@
==============================================================================

This way I can tweak things if I have to include a bunch of graphics of the
same size in a file.  I am not great with LaTeX and still very new to using
Sweave, so I was wondering what the preferred method of doing something like
this is between LaTeX and Sweave.  I have seen some people doing some tricky
stuff from within R such that when their code is preprocessed it is compiled
as LaTeX source, but this seems like an ugly hack for something so simple.

Please forgive me if this has been addressed elsewhere; I have found
documentation on Sweave to be rather sparse.

Best,

Kyle

	[[alternative HTML version deleted]]

