Re: [Rd] rep fails on pairlist

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Thu, 26 Jul 2012 16:27:33 -0400

On Thu, Jul 26, 2012 at 4:24 PM, Dirk Eddelbuettel <edd_at_debian.org> wrote:
>
> On 26 July 2012 at 15:55, Gabor Grothendieck wrote:
> | This code which has worked for years in R but fails under R-devel:
> |
> | > R.version.string
> | [1] "R Under development (unstable) (2012-07-25 r59963)"
> | >
> | > n <- 3
> | > f <- function(x) {}
> | > formals(f) <- rep(formals(f), n) ##
> | Error in rep(formals(f), n) : replication of pairlists is defunct
> |
> | The message suggests that the change was intentional.
> | Why was this functionality removed?
> | What code should be used in its place?
>
> FWIW there are changes happening right now to rep() so that may be spillage
> from code under development. To keep abreast of these changes, I follow the
> RSS feed Duncan set up a few years ago -- it is also as html at
>
> http://developer.r-project.org/blosxom.cgi/R-devel
>
> and summarizes changes committed to the NEWS file, ie high-level changes
> worth knowing about.

That page says:

Calling ‘rep()’ or ‘rep.int()’ on a pairlist or other non-vector object is now an error.

so it again seems to be intentional.

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu 26 Jul 2012 - 20:33:41 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 26 Jul 2012 - 20:40:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive