[Rd] cbind/rbind fail on matrixes containing lists (PR#6702)

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Mar 27 09:03:05 CET 2004


On Fri, 26 Mar 2004, Thomas Lumley wrote:

> On Fri, 26 Mar 2004, Thomas Lumley wrote:
> 
> >
> > Yep, bind.c:do_bind has
> >
> >     switch(mode) {
> >     case NILSXP:
> >     case LGLSXP:
> >     case INTSXP:
> >     case REALSXP:
> >     case CPLXSXP:
> >     case STRSXP:
> >         break;
> >     default:
> >         errorcall(call, "cannot create a matrix from these types");
> >     }
> >
> >
> > Looks like a fairly simple fix to me.
> 
> Not any more it doesn't.  bind.c:AnswerType puts lists together with
> pairlists and who knows what else in its `other' class, so a bit more
> thought and coding is needed.
> 
> It should be fairly straightforward, but it's not a localised change.

That's not the main problem area: the actual cbind code does not handle
vector lists.  I've treated it as a documentation fix / enhancement 
request.

Brian

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list