Thanks you very much Hadley, Stephen, and Sundar, your suggestions
all solve my problem, even if the narrower dataframe contains
variables that are new to the wider dataframe.
I'm sure glad I took the time to write instead of pursuing with my
ugly and time-consuming solution.
Denis
> Dear
> Or, try this:
>
> http://finzi.psych.upenn.edu/R/Rhelp02a/archive/77358.html
It's interesting to compare your implementation:
rbind.all <- function(...) {
x <- list(...)
cn <- unique(unlist(lapply(x, colnames)))
for(i in seq(along = x)) {
if(any(m <- !cn %in% colnames(x[[i]]))) {
hadley wickham said the following on 11/7/2006 8:46 PM:
> On 11/7/06, Denis Chabot <[EMAIL PROTECTED]> wrote:
>> Dear list members,
>>
>> I have to combine dataframes together. However they contain different
>> numbers of variables. It is possible that all the variables in the
>> dataframe with f
Denis,
On Nov 7, 2006, at 8:30 PM, Denis Chabot wrote:
> Dear list members,
>
> I have to combine dataframes together. However they contain different
> numbers of variables. It is possible that all the variables in the
> dataframe with fewer variables are contained in the dataframe with
> more va
On 11/7/06, Denis Chabot <[EMAIL PROTECTED]> wrote:
> Dear list members,
>
> I have to combine dataframes together. However they contain different
> numbers of variables. It is possible that all the variables in the
> dataframe with fewer variables are contained in the dataframe with
> more variabl
Dear list members,
I have to combine dataframes together. However they contain different
numbers of variables. It is possible that all the variables in the
dataframe with fewer variables are contained in the dataframe with
more variables, though it is not always the case.
There are key vari