From @nto|ne@|@br| @end|ng |rom gm@||@com  Mon Sep  2 11:40:34 2019
From: @nto|ne@|@br| @end|ng |rom gm@||@com (Ant F)
Date: Mon, 2 Sep 2019 11:40:34 +0200
Subject: [Rd] rbind returns a zero row data frame when binding zero column
 data frames
Message-ID: <CAEKh8ugioHvK2iiYo4upFjU2DWZB_7Jg200DZmrDqE6Ok3fuVg@mail.gmail.com>

Dear all,

`rbind()` returns a zero row data frame when binding zero column data
frames, see example below:

``` r
# a data frame with 1 row and 0 column
x <- data.frame(row.names=1)
x
#> data frame with 0 columns and 1 row
rbind(x,x)
#> data frame with 0 columns and 0 rows
```

I would have expected in that case `data frame with 0 columns and 2 rows`.

`cbind()` on the other hand acts as I would expect, returning a 2 column
data frame from 2 one column data frames even if they have no row.

``` r
# a data frame with 0 row and 1 column
y <- data.frame(A = numeric(0))
y
#> [1] A
#> <0 rows> (or 0-length row.names)
cbind(y,y)
#> [1] A A
#> <0 rows> (or 0-length row.names)
```

	[[alternative HTML version deleted]]



[Rd] rbind returns a zero row data frame when binding zero column data frames
Ant F