{ # miscellaneous things that used to make S hang, which don't find # a place anywhere else. T } { # changing the values of more than one "special" (internally # significant) S object, such as .Options, .Random.seed, in a # function made S go into a tight infinite loop. # sbug 8/23/91 bill # This test suite is taken from the mail. It makes sure that # .Options and .Random.seed are dealt with correctly. (Though # this eludes me.) "bar"<- function(x) { x <- runif(1) .Options$digits <- 3 x } .Random.seed <<- c(45, 49, 42, 55, 33, 2, 54, 28, 9, 4, 58, 1) r1 <- bar() runif(1) o <- .Options$digits .Random.seed <<- c(45, 49, 42, 55, 33, 2, 54, 28, 9, 4, 58, 1) r2 <- runif(2)[1] r1 == r2 && o == 7 }