From Niels.R.Hansen+lists at math.ku.dk  Sat Dec 11 08:23:39 2010
From: Niels.R.Hansen+lists at math.ku.dk (Niels Richard Hansen)
Date: Fri, 10 Dec 2010 23:23:39 -0800
Subject: [Rd] 'identical' and the warning "ignoring non-pairlist attributes"
Message-ID: <4D0326FB.1030505@math.ku.dk>

Dear R developers

Using the 'foreach' package I encounter warnings like

Warning message:
In identical(.combine, cbind) : ignoring non-pairlist attributes

Warnings appear once in a new R-session when I run a
particular piece of code - and not again. I understand from
the source code of 'identical' that the function checks and
believes that .combine and cbind have non-pairlist attributes, but I
don't understand how this can be the case

I have produced the following minimal example

data.frame()[rep(1,1e6), ]
library(foreach)
identical(foreach:::defcombine, cbind)

resulting in

[1] FALSE
Warning message:
In identical(foreach:::defcombine, cbind) :
   ignoring non-pairlist attributes

The warning is not related to the foreach package it seems. I get
the same kind of warning with e.g.

identical(spatial:::trmat, cbind)

in a new R-session. Many other functions I have tried do, however,
not result in the warning. The warning depends on the supposedly completely
unrelated data frame operation. It seems also to be related to the
fact that the data frame is empty and I extract a large number of
columns out of this empty data frame. I would highly appreciate help
on this to get rid of the warning in my own package.

Thanks, Niels

R version 2.12.1 RC (2010-12-10 r53825)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] foreach_1.3.0   codetools_0.2-6 iterators_1.0.3

(or
other attached packages:
[1] spatial_7.3-2)

-- 
Niels Richard Hansen                     Web:   www.math.ku.dk/~richard	
Associate Professor                      Email: Niels.R.Hansen at math.ku.dk
Department of Mathematical Sciences             nielsrichardhansen at gmail.com
University of Copenhagen                 Skype: nielsrichardhansen.dk	
Universitetsparken 5                     Phone: +1 510 502 8161	
2100 Copenhagen ?
Denmark



[Rd] 'identical' and the warning "ignoring non-pairlist attributes"
Niels Richard Hansen