[Rd] formals assignment now strips attributres

Patrick Burns pburns at pburns.seanet.com
Sat Apr 30 13:26:03 CEST 2005


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 at 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")



More information about the R-devel mailing list