Message-ID: <16018.31990.297155.4316@ci.tuwien.ac.at>
Date: 2003-04-08T07:40:38Z
From: Friedrich.Leisch@univie.ac.at
Subject: sweave quesiton
In-Reply-To: <Pine.GSO.4.10.10304072224220.29778-100000@athena.biostat.jhsph.edu>
>>>>> On Mon, 07 Apr 2003 22:33:31 -0400 (EDT),
>>>>> Rafael A Irizarry (RAI) wrote:
> 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?
Not at the moment, because all Sweave evaluations are done in the
global environment.
.f
--
-------------------------------------------------------------------
Friedrich Leisch
Institut f?r Statistik & DSS Tel: (+43 1) 4277 38613
Universit?t Wien Fax: (+43 1) 4277 38639
Universit?tsstra?e 5 Friedrich.Leisch at univie.ac.at
1010 Wien, Austria http://mailbox.univie.ac.at/Friedrich.Leisch
-------------------------------------------------------------------