On 4/28/05, Omar Lakkis <[EMAIL PROTECTED]> wrote: 
> 
> > r
> [1] open settle
> <0 rows> (or 0-length row.names)
> > class(r)
> [1] "data.frame"
> 
> this is an empty data.frame I get back from a sql statement that
> returns an empty result set. How can I create such an empty data.frame
> using the data.frame() constructor?
> I want to have a data.frame with 0 rows but named empty columns.

  > data.frame(a = numeric(0), b = numeric(0))
[1] a b
<0 rows> (or 0-length row.names)

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to