Displaying 1 result from an estimated 1 matches for "tmp12c".
Did you mean:
tmp12
2006 Mar 06
1
Sort problem in merge()
...ween
## different merges. Levels are also different, once only levels
## from original data.frame are used, while in second example all
## levels are propagated.
## I have tried the same with characters
> tmp1$col1 <- as.character(tmp1$col1)
> tmp2$col1 <- as.character(tmp2$col1)
> (tmp12c <- merge(tmp1, tmp2, by.x = "col1", by.y = "col1",
all.x = TRUE, sort = FALSE))
col1 col2
1 C 1
2 C 1
3 A NA
4 A NA
5 0 NA
6 0 NA
> (tmp21c <- merge(tmp2, tmp1, by.x = "col1", by.y = "col1",...