What version of R is this (please do see the posting guide)?
In both 2.1.0 and 2.1.1 beta I get
all
Promoter ip.x ip.y ip
130 40 40
240 40 40
3a 10 NA NA
4c 20 20 20
5b NA 15 15
6d NA 30 30
so cannot reproduce your
Thanks for your quick responses, Gabor and Brian.
I'm currently running R version 1.9.1 on Linux. Actually, I have just
tested this on R v.2.1.0 running under Windows XP, and indeed, as you both
indicate, the problem does not exist on that version for that OS. So, at an
appropriate time I'll
Run this:
p - c('a', 'c', '', ''); a - c(10, 20, 30, 40); d1 -
data.frame(Promoter=p, ip=a) # Note duplicate empty names in p.
p - c('b', 'c', 'd', ''); a - c(15, 20, 30, 40); d2 -
data.frame(Promoter=p, ip=a)
all - merge(x=d1, y=d2, by=Promoter, all=T)
all - merge(x=all, y=d2, by=Promoter,
What version of R are you using? I don't get the same
result on my system:
R.version.string # Windows XP
[1] R version 2.1.0, 2005-06-10
p - c('a', 'c', '', ''); a - c(10, 20, 30, 40); d1 -
+ data.frame(Promoter=p, ip=a) # Note duplicate empty names in p.
p - c('b', 'c', 'd', ''); a - c(15,