Displaying 1 result from an estimated 1 matches for "testbar".
Did you mean:
testar
2010 May 28
1
Does Sweave run in the global environment ?
...ve.Rnw")
require(tools)
texi2dvi(file = "test_sweave.tex", pdf = TRUE)
|
my resulting file does contain the foo string
|> if (exists("foo")) {
+ print(foo)
+ }
[1] "My Test String"
> ls()
[1] "foo" "testFoo"
|
and if I run this code
|testBar<-function(){
foo<<-"My Test String"
Sweave("test_sweave.Rnw")
require(tools)
texi2dvi(file = "test_sweave.tex", pdf = TRUE)
}
rm(foo)
testBar()
|
My resulting file also contains the foo string
|> if (exists("foo")) {
+ print(fo...