From ggrothendieck at gmail.com  Fri Aug 17 16:53:59 2007
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Fri, 17 Aug 2007 10:53:59 -0400
Subject: [Rd] expand.grid fails on zero dims
Message-ID: <971536df0708170753n402385cbva2b59c5df59b53a6@mail.gmail.com>

expand.grid fails if any of the arguments are zero length:

> expand.grid(1:2, 1, seq_len(0))
Error in rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) :
        invalid number of copies in rep.int()

I think it would be desirable if it output a data frame with zero rows.



[Rd] expand.grid fails on zero dims
Gabor Grothendieck