I have two data frames:
df1
Syllable Duration Pitch
@         0.08    93
@         0.05    107
@         0.13    56
@         0.07    95
@         0.07    123
df2
Syllable Duration 
@        0.08 
@        0.05 
@        0.07
@        0.07 
I want to merge them into another data frame:
df3
Syllable Duration Pitch
@        0.08     93
@        0.05     107
@        0.07     95
@        0.07     123
The problem is that I have repeated Syllable and Duration values. I've tried this code, but it gives me incorrect Pitch:
df3 <- merge(df2, df1[!duplicated(df1$Syllable),], by="Syllable")
df3
Syllable Duration Pitch
@        0.08     93
@        0.05     93
@        0.07     93
@        0.07     93
 
     
     
     
    