Skip to content

Instantly share code, notes, and snippets.

@mkuhn
Created Aug 14, 2015
Embed
What would you like to do?
library(dplyr)
a <- data.frame(foo = 1:10, bar = "bar")
b <- tbl_df(a)
a[,1]
b[,1]
paste0(a[,1], "!")
paste0(b[,1], "!")
> 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!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment