Created
June 23, 2014 23:32
-
-
Save gghatano/cb0773be5e7b611a7b9b to your computer and use it in GitHub Desktop.
data.tableをinner_joinするとdata.frameになって困る?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(data.table) | |
library(dplyr) | |
dt1 = data.table(x = 1, y = 1) | |
dt2 = data.table(x = 1, z = 1) | |
dt1 %>% inner_join(dt2, by = "x") | |
# x y z | |
#1 1 1 1 | |
dt1 %>% inner_join(dt2, by = "x") %>% class | |
# [1] "data.frame" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
data.tableどうしをinner_joinで結合したらdata.frameになっている.
ずっとdata.tableでいて欲しいですよね.