to study for a while
thank you for your help
max
- Original Message - From: "MacQueen, Don"
To: "Massimo Bressan" ;
Sent: Monday, January 30, 2012 4:47 PM
Subject: Re: [R] merge multiple data frames
Does this example help? It doesn't handle the problem of
thanks don
I have here enough to study for a while
thank you for your help
max
- Original Message -
From: "MacQueen, Don"
To: "Massimo Bressan" ;
Sent: Monday, January 30, 2012 4:47 PM
Subject: Re: [R] merge multiple data frames
Does this example help? I
t;-sqldf("select a_b.*, c.* from a_b left join c on a_b.date=c.date")
>
>bye
>
>max
>
>
>
>
>
>- Original Message -
>From: "MacQueen, Don"
>To: "maxbre" ;
>Sent: Saturday, January 28, 2012 12:24 AM
>Subject: Re
thanks michael
it's working like a charm: that's exaclty what I was looking for
bye
max
- Original Message -
From: "R. Michael Weylandt"
To: "Massimo Bressan"
Cc:
Sent: Friday, January 27, 2012 4:16 PM
Subject: Re: [R] merge multiple data frames
O
t a_b.*, c.* from a_b left join c on a_b.date=c.date")
bye
max
- Original Message -
From: "MacQueen, Don"
To: "maxbre" ;
Sent: Saturday, January 28, 2012 12:24 AM
Subject: Re: [R] merge multiple data frames
Not tested, but this might be a case for the s
Not tested, but this might be a case for the sqldf package.
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 1/26/12 9:29 AM, "maxbre" wrote:
>This is my reproducible example (three data frames: a, b, c)
>
>a<-structure
Massimo Bressan
wrote:
> I tested your code: it's OK but there is still the problem of the suffixes
> for the last dataframe
> thank you for the support
>
>
> - Original Message - From: "R. Michael Weylandt"
>
> To: "maxbre"
> Cc:
I tested your code: it's OK but there is still the problem of the suffixes
for the last dataframe
thank you for the support
- Original Message -
From: "R. Michael Weylandt"
To: "maxbre"
Cc:
Sent: Thursday, January 26, 2012 8:19 PM
Subject: Re: [R] m
thank you for your reply
I'll study and test your code (which is a bit obscure to me up to now);
by the way do you think that "merge_all" is a wrong way to hit?
thanks again
m
--
View this message in context:
http://r.789695.n4.nabble.com/merge-multiple-data-frames-tp4331089p4331830.html
Sent fr
I might do something like this:
mergeAll <- function(..., by = "date", all = TRUE) {
dotArgs <- list(...)
Reduce(function(x, y)
merge(x, y, by = by, all = all, suffixes=paste(".", names(dotArgs),
sep = "")),
dotArgs)}
mergeAll(a = a, b = b, c = c)
str(.Last.value)
You also might be able
This is my reproducible example (three data frames: a, b, c)
a<-structure(list(date = structure(1:6, .Label = c("2012-01-03",
"2012-01-04", "2012-01-05", "2012-01-06", "2012-01-07", "2012-01-08",
"2012-01-09", "2012-01-10", "2012-01-11", "2012-01-12", "2012-01-13",
"2012-01-14", "2012-01-15", "
11 matches
Mail list logo