Skip to content

Instantly share code, notes, and snippets.

@yutannihilation
Last active January 26, 2019 15:27
Show Gist options
  • Save yutannihilation/75551a4ab449f9aeb004ef0eb0575ec3 to your computer and use it in GitHub Desktop.
Save yutannihilation/75551a4ab449f9aeb004ef0eb0575ec3 to your computer and use it in GitHub Desktop.
library(dplyr, warn.conflicts = FALSE)
library(tibble)

d <- tibble(a = 1:3)

# fail
d %>% 
  mutate(b = tibble(x = 1:3))
#> Error: Column `b` is of unsupported class data.frame

# not fail, but not the expected result...
bind_cols(d, x = tibble(x = 1:3))
#> # A tibble: 3 x 2
#>       a     x
#>   <int> <int>
#> 1     1     1
#> 2     2     2
#> 3     3     3

d2 <- tibble(x = tibble(x = 1:3))

# fail
bind_cols(d, d2)
#> Error: Argument 1 can't be a list containing data frames

Created on 2019-01-27 by the reprex package (v0.2.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment