From Kurt.Hornik@ci.tuwien.ac.at  Mon Dec 27 08:04:43 1999
From: Kurt.Hornik@ci.tuwien.ac.at (Kurt Hornik)
Date: Mon, 27 Dec 1999 09:04:43 +0100
Subject: concatenating dataframes (PR#381)
In-Reply-To: <199912202244.XAA25245@pubhealth.ku.dk>
References: <199912202244.XAA25245@pubhealth.ku.dk>
Message-ID: <199912270804.JAA17645@aragorn.ci.tuwien.ac.at>

>>>>> jlindsey  writes:

> The following work if y is an ordinary matrix but not a dataframe:
> tt <- NULL
> y <- data.frame(1:20,1:20)
> rbind(tt,y)

> gives "incompatible types" error (if the dataframe contains only factor
> variables, it gives warnings but works)

> if I initialize instead with

> tt <- list()

> it gives a "missing value where logical needed" error.

I've added a line in rbind.data.frame() which removes all length 0
arguments.  This solves the problems you describe and passes make check,
but I am not sure if we really want it ...

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


concatenating dataframes (PR#381)
Kurt Hornik