Skip to content
Back to formatted view

Raw Message

Message-ID: <AEE947A3-88FD-429B-9F45-F5E37DB0C151@comcast.net>
Date: 2012-08-23T23:23:55Z
From: David Winsemius
Subject: Concatenating data frames in R versus SAS
In-Reply-To: <1345755323514-4641138.post@n4.nabble.com>

On Aug 23, 2012, at 1:55 PM, ramoss wrote:

> I am trying to concatenate 2 datasets that don't have exactly the same
> column.
> In SAS I did: data summary;
>  set agency prop;
> run;
> No problem
> in R I get error message
> summary <-rbind(agency,prop)
> Error in match.names(clabs, names(xi)) :
>  names do not match previous names

This would be the point at which I would want to know the results of:

str(agency)
str(prop)

>
> But when I use rbin.fill, that overwrites the second file w/ first  
> one.
> Is there a way to replicate the sas process in R?
>
> Thanks in advance
>

Code... we want code.  .... and data.

> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


-- 
David Winsemius, MD
Alameda, CA, USA