Created
August 14, 2015 14:22
-
-
Save mkuhn/69bb73f98363c4fd1ff3 to your computer and use it in GitHub Desktop.
Revisions
-
mkuhn created this gist
Aug 14, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ library(dplyr) a <- data.frame(foo = 1:10, bar = "bar") b <- tbl_df(a) a[,1] b[,1] paste0(a[,1], "!") paste0(b[,1], "!") 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ > library(dplyr) > > a <- data.frame(foo = 1:10, bar = "bar") > b <- tbl_df(a) > > a[,1] [1] 1 2 3 4 5 6 7 8 9 10 > b[,1] Source: local data frame [10 x 1] foo 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 > > paste0(a[,1], "!") [1] "1!" "2!" "3!" "4!" "5!" "6!" "7!" "8!" "9!" "10!" > paste0(b[,1], "!") [1] "1:10!"