R/tidyr.R
tidyr_table_manipulation.Rd
Use these methods without the '.zoomed_dm' suffix (see examples).
# S3 method for zoomed_dm unite(data, col, ..., sep = "_", remove = TRUE, na.rm = FALSE) # S3 method for zoomed_dm separate(data, col, into, sep = "[^[:alnum:]]+", remove = TRUE, ...)
data | object of class |
---|---|
col | For For |
... | For For |
sep | For For |
remove | For For |
na.rm | see |
into | see |
zoom_united <- dm_nycflights13() %>% dm_zoom_to(flights) %>% select(year, month, day) %>% unite("month_day", month, day) zoom_united#> # Zoomed table: flights #> # A tibble: 11,227 x 2 #> year month_day #> <int> <chr> #> 1 2013 1_10 #> 2 2013 1_10 #> 3 2013 1_10 #> 4 2013 1_10 #> 5 2013 1_10 #> 6 2013 1_10 #> 7 2013 1_10 #> 8 2013 1_10 #> 9 2013 1_10 #> 10 2013 1_10 #> # … with 11,217 more rows#> # Zoomed table: flights #> # A tibble: 11,227 x 3 #> year month day #> <int> <chr> <chr> #> 1 2013 1 10 #> 2 2013 1 10 #> 3 2013 1 10 #> 4 2013 1 10 #> 5 2013 1 10 #> 6 2013 1 10 #> 7 2013 1 10 #> 8 2013 1 10 #> 9 2013 1 10 #> 10 2013 1 10 #> # … with 11,217 more rows