[R] sweave quesiton

Rafael A. Irizarry ririzarr at jhsph.edu
Tue Apr 8 04:33:31 CEST 2003


if i write a funciton like this

	f <- function(x) Sweave("report.Rnw")

and report.Rnw has an R chunk like this:
	
	<<>>=
	print(x)
	@

i get an error: 'Object "x" not found'. 

is there a way to avoid this
without using assign to create a global variable?

thanks,
rafael



More information about the R-help mailing list