From pburns at pburns.seanet.com  Sat Apr 30 13:26:03 2005
From: pburns at pburns.seanet.com (Patrick Burns)
Date: Sat Apr 30 13:26:58 2005
Subject: [Rd] formals assignment now strips attributres
Message-ID: <42736B4B.3080507@pburns.seanet.com>

The assignment form of 'formals' strips attributes (or something close
to that) from the values in the list.  This wasn't intentional, was it?

The current behavior (2.0.0 through 2.1.0 on Windows at least):

 > fjj <- function() x
 > formals(fjj) <- list(x=c(a=2, b=4))
 > fjj
function (x = c(2, 4))
x


Previous behavior:

 > fjj <- function() x
 > formals(fjj) <- list(x=c(a=2, b=4))
 > fjj
function (x = structure(c(2, 4), .Names = c("a", "b")))
x

Patrick Burns

Burns Statistics
patrick@burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")


[Rd] formals assignment now strips attributres
Patrick Burns