From ripley at stats.ox.ac.uk  Sat Mar 27 09:03:43 2004
From: ripley at stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Sat Mar 27 09:03:49 2004
Subject: [Rd] cbind/rbind fail on matrixes containing lists (PR#6702)
Message-ID: <20040327080343.4703910438@slim.kubism.ku.dk>

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@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


[Rd] cbind/rbind fail on matrixes containing lists (PR#6702)
ripley@stats.ox.ac.uk