R-alpha: R 0.50.a1 problem

Kurt Hornik Kurt.Hornik@ci.tuwien.ac.at
Mon, 28 Jul 1997 15:23:49 +0200


Here's something really strange.

********************************************************
R> x <- 1:5
R> x
[1] 1 2 3 4 5

R> test1
function (x) 
{
        structure(x, call = sys.call())
}
R> test1(x)
[1] 1 2 3 4 5
attr(,"call")
test1(x)

R> test2
function (x) 
{
        attr(x, "call") <- sys.call()
        x
}
R> test2(x)
Error: stack overflow
********************************************************

Using the attr() form results in an endless loop ...

-k
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-