Perfect - many thanks!!!
baptiste auguie-2 wrote:
>
> The function expects a list of data.frames as a first argument but you
> provided a data.frame instead, the others are interpreted as optional
> arguments to merge_recurse(). Try this instead,
>
>> merge_recurse(list(DF1,DF2,DF3,DF4))
>
The function expects a list of data.frames as a first argument but you
provided a data.frame instead, the others are interpreted as optional
arguments to merge_recurse(). Try this instead,
merge_recurse(list(DF1,DF2,DF3,DF4))
var1x yt u d ef o
1a 1
I tried using merge_all as shown below but I am getting an error ... can
anyone tell me what I am doing wrong? The result table below is what I am
looking for.
DF1 <- data.frame(var1 = letters[1:5], x = rnorm(5), y =2)
DF2 <- data.frame(var1 = letters[1:5], t = rnorm(5), u =2)
DF3 <- data.frame(
Hi,
Try this:
DF1 <- data.frame(var1 = letters[1:5], x = rnorm(5), y =2)
DF2 <- data.frame(var1 = letters[3:7], x = rnorm(5), y=3)
DF3 <- data.frame(var1 = letters[6:10], x = rnorm(5), y=0)
# ... DF10 if you wish
( result <- merge_all(list(DF1, DF2, DF3) ))
save( result, file ="merged.rda")
Hi R users,
Can anyone share some example code using merge_all (from the reshape
package) to merge 10 data frames into 1 file.
Thanks in advance for any help!
--
View this message in context:
http://www.nabble.com/Merge-10-data-frames-with-3-id-columns-that-are-common-to-all-data-frames-tp2240
5 matches
Mail list logo