From Kurt.Hornik@ci.tuwien.ac.at  Mon Jul 28 14:23:49 1997
From: Kurt.Hornik@ci.tuwien.ac.at (Kurt Hornik)
Date: Mon, 28 Jul 1997 15:23:49 +0200
Subject: R-alpha: R 0.50.a1 problem
Message-ID: <199707281323.PAA18657@aragorn.ci.tuwien.ac.at>

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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: R 0.50.a1 problem
Kurt Hornik