expand.grid returns vector for single arg (PR#319)

Prof Brian D Ripley ripley@stats.ox.ac.uk
Thu, 11 Nov 1999 07:14:39 +0000 (GMT)


On Thu, 11 Nov 1999 cberry@tajo.ucsd.edu wrote:

> IMHO,
> 
> expand.grid(1:3)
> 
> should return an object of class "data.frame".

[using 0.65.1 it returns its argument if there is just one]

It will in 0.90.0: this has already been altered:

BUG FIXES

...

    o   expand.grid returns a data frame even for one arg


I am not sure that is what I think it should do (no expanding goes on)
but it is what the documentation says and the prototype does.

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._