Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

left-joining to empty data.frame yields NAs instead of empty data.frame #48

Closed
HarlanH opened this Issue · 0 comments

2 participants

@HarlanH

Using plyr 1.5.2:

aa <- data.frame(aa=1:3, bb=4:6)
bb <- data.frame(aa=1:10, cc=20:29)
join(aa,bb)
join(subset(aa,subset=aa==0), bb)

For the last line, I get:

Joining by: aa
   aa bb cc
1  NA NA NA
2  NA NA NA
3  NA NA NA
4  NA NA NA
5  NA NA NA
6  NA NA NA
7  NA NA NA
8  NA NA NA
9  NA NA NA
10 NA NA NA
Warning message:
In data.frame(..., check.names = FALSE) :
  row names were found from a short variable and have been discarded

I was expecting to get an empty dataframe back.

Thanks!

@hadley hadley closed this in c6cc206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.