Questions tagged [merge]

Merging is a generic term for combining two or more related sets of data. It is commonly associated with revision control systems when reconciling multiple changes made to a revision-controlled collection of files. Merging multiple data sets is another use of this tag.

Most often, it is necessary when a file is modified by two people on two different computers at the same time. When two branches are merged, the result is a single collection of files that contains both sets of changes.

In some cases, the merge can be performed automatically, because the changes do not conflict. In other cases, a person must decide exactly what the resulting files should contain. Many revision control software tools include merge capabilities.

Merge can be used as a verb ("to merge branches"), but can also be a noun ("this merge will be difficult").

Merging multiple data sets is another use of this tag.

Merge can also refer to the Ruby Hash#merge method for merge hashes or git merge command for git revision control system.

Merge is different from join in datasets which is primarily SQL based. Difference between merge and join for SAS is here http://www2.sas.com/proceedings/sugi30/249-30.pdf and for R is here How to join (merge) data frames (inner, outer, left, right)?

See Wikipedia: Merge Version Control.

24925 questions
7
votes
3 answers

What is the equivalent to R's match() for python Pandas/numpy?

I'm an R user and I cannot figure out the pandas equivalent of match(). I need use this function to iterate over a bunch of files, grab a key piece of info, and merge it back into the current data structure on 'url'. In R I'd do something like…
Solomon
  • 946
  • 14
  • 18
7
votes
5 answers

Calculate "group characteristics" without ddply and merge

I wonder whether there is a more straighforward way to calculate a certain type of variables than the approach i normally take.... The example below probably explains it best. I have a dataframe with 2 columns (fruit and whether the fruit is rotten…
user1885116
  • 1,757
  • 4
  • 26
  • 39
7
votes
4 answers

concatenating/ merging time series (in R)

I have to xts/zoo objects. each has measures of different variables over a different time span. I want to create a single time series comprising all measures at all times, with NAs for missing dates/variable combinations. how do I do…
amit
  • 3,332
  • 6
  • 24
  • 32
7
votes
4 answers

interweave two data.frames in R

I would like to interweave two data.frame in R. For example: a = data.frame(x=1:5, y=5:1) b = data.frame(x=2:6, y=4:0) I would like the result to look like: > x y 1 5 2 4 2 4 3 3 3 3 ... obtained by cbinding x[1] with y[1], x[2] with…
Alex
  • 19,533
  • 37
  • 126
  • 195
7
votes
2 answers

How to merge several audio files using sox

I use this command to merge two audio files into one using sox: sox end.mp3 -p pad 6 0 | sox - -m start.mp3 output.mp3 I was wondering how can I merge 3 or 4 audio files using only one command instead of using the "output.mp3" as the input to the…
Yngwie Pompas
  • 71
  • 1
  • 1
  • 2
7
votes
1 answer

Merging diff between two git branches and applying it to working copy

I have a development repository and a deploy repository. When deploying code, a codebase is checked out of dev, rsync'd to the deploy working copy, and committed to the deploy repository. These repositories are therefore separate, but similar. On…
Tim Trinidad
  • 137
  • 1
  • 1
  • 6
7
votes
2 answers

fast join data.table (potential bug, checking before reporting)

This might be a bug. In that case, I will delete this question and report as bug. I would like someone to take a look to make sure I'm not doing something incorrectly so I don't waste the developer time. test = data.table(mo=1:100, b=100:1,…
Alex
  • 19,533
  • 37
  • 126
  • 195
7
votes
1 answer

Multiple joins/merges with data.tables

I have two data.tables, DT and L: > DT = data.table(x=rep(c("a","b","c"),each=3), y=c(1,3,6), v=1:9,key="x") > L=data.table(yv=c(1L:8L,12L),lu=c(letters[8:1],letters[12]),key="yv") > DT x y v 1: a 1 1 2: a 3 2 3: a 6 3 4: b 1 4 5: b 3 5 6: b 6…
dnlbrky
  • 9,396
  • 2
  • 51
  • 64
7
votes
3 answers

Compare two vectors of different length in R

I've been struggling with this problem, and decided to ask for some help after some fails.. Here is my problem, I want to divide these two vectors based on the day, for instance 2012-12-11 will be 3/17 and 2012-12-12 should be 0/7. However I can't…
psoares
  • 4,733
  • 7
  • 41
  • 55
7
votes
3 answers

Join and sum not compatible matrices

My goal is to "sum" two not compatible matrices (matrices with different dimensions) using (and preserving) row and column names. I've figured this approach: convert the matrices to data.table objects, join them and then sum columns vectors. An…
leodido
  • 912
  • 7
  • 21
7
votes
5 answers

Semantic merge tool

Background: In my job, we use SVN, C# and VisualStudio. Part of my task regularly involves global renames. Often I end up with a broken build after renaming something and then merging in changes. The question: is there a solution out there that can…
BCS
  • 75,627
  • 68
  • 187
  • 294
7
votes
1 answer

How to merge two windows vc static library into one

I am having a two static library a.lib and b.lib(of C language) which is generated using VC6 (Visual studio 6.0) . I want to merge these two libs into one static lib c.lib. How to do this in CLI mode? I have seen the merging of *nix static libs. I…
rashok
  • 12,790
  • 16
  • 88
  • 100
7
votes
1 answer

is this implementation of merge sort good?

I've just started to learn Haskell last night and I've never used a functional programming language before. I just want to know if my implemention of merge sort is good or bad and what exactly is good or bad. Maybe it's even wrong - Well it does…
Nocta
  • 199
  • 2
  • 9
7
votes
5 answers

Visual Studio, svn and merging .csproj and .sln files

Anyone had any success getting SVN to merge Visual Studio project (.csproj) or solution (.sln) files that have been edited by two users? Example User A checks out project User B checks out same project User A adds a file User A commits changes User…
3Dave
  • 28,657
  • 18
  • 88
  • 151
7
votes
2 answers

git merge ignores deleted files, existing on merged branch (renamed files)

I've got the branches feature1 and master. Then in feature1 I renamed a file dir/file.txt into dir2/file2.txt. After that I altered the file in master and a week later altered the file in feature1 too. I have 40 files changed like that across the…
Alex
  • 11,479
  • 6
  • 28
  • 50
1 2 3
99
100