unfold.Rd
unfold(x, from_col, ...)
x | a Momocs object |
---|---|
from_col | column name |
... | useless |
Differs from tidyr::unnest
, in that it adds a "shp" column.
Also unpack
was already take by tidyr
. unfold.list
is just dplyr::bind_rows
.
bot$coo %>% unfold#> # A tibble: 6,469 x 3 #> x y group #> <dbl> <dbl> <int> #> 1 37 561 1 #> 2 40 540 1 #> 3 40 529 1 #> 4 43 508 1 #> 5 46 487 1 #> 6 48 477 1 #> 7 52 456 1 #> 8 54 435 1 #> 9 57 414 1 #> 10 59 403 1 #> # … with 6,459 more rowsbot %>% unfold#> ℹ unfold.mom_tbl: can only handle a single coo_list, using coo column#> # A tibble: 6,469 x 5 #> x y group type fake #> <dbl> <dbl> <int> <fct> <fct> #> 1 37 561 1 whisky a #> 2 40 540 1 whisky a #> 3 40 529 1 whisky a #> 4 43 508 1 whisky a #> 5 46 487 1 whisky a #> 6 48 477 1 whisky a #> 7 52 456 1 whisky a #> 8 54 435 1 whisky a #> 9 57 414 1 whisky a #> 10 59 403 1 whisky a #> # … with 6,459 more rows