R/dplyr.R
dplyr_table_manipulation.Rd
Use these methods without the '.zoomed_dm' suffix (see examples).
# S3 method for zoomed_dm filter(.data, ...) # S3 method for zoomed_dm mutate(.data, ...) # S3 method for zoomed_dm transmute(.data, ...) # S3 method for zoomed_dm select(.data, ...) # S3 method for zoomed_dm rename(.data, ...) # S3 method for zoomed_dm distinct(.data, ..., .keep_all = FALSE) # S3 method for zoomed_dm arrange(.data, ...) # S3 method for zoomed_dm slice(.data, ..., .keep_pk = NULL) # S3 method for zoomed_dm group_by(.data, ...) # S3 method for zoomed_dm ungroup(x, ...) # S3 method for zoomed_dm summarise(.data, ...) # S3 method for zoomed_dm count( x, ..., wt = NULL, sort = FALSE, name = NULL, .drop = group_by_drop_default(x) ) # S3 method for zoomed_dm tally(x, ...) # S3 method for zoomed_dm pull(.data, var = -1, ...)
.data | object of class |
---|---|
... | see corresponding function in package dplyr or tidyr |
.keep_all | For |
.keep_pk | For |
x | For |
wt | <
|
sort | If |
name | The name of the new column in the output. If omitted, it will default to |
.drop | For |
var | A variable specified as:
The default returns the last column (on the assumption that's the column you've created most recently). This argument is taken by expression and supports quasiquotation (you can unquote column names and column locations). |
zoomed <- dm_nycflights13() %>% dm_zoom_to(flights) %>% group_by(month) %>% arrange(desc(day)) %>% summarize(avg_air_time = mean(air_time, na.rm = TRUE)) zoomed#> # Zoomed table: flights #> # A tibble: 12 x 2 #> month avg_air_time #> <int> <dbl> #> 1 1 147. #> 2 2 149. #> 3 3 144. #> 4 4 158. #> 5 5 147. #> 6 6 152. #> 7 7 153. #> 8 8 157. #> 9 9 138. #> 10 10 143. #> 11 11 157. #> 12 12 179.#> ── Metadata ──────────────────────────────────────────────────────────────────── #> Tables: `airlines`, `airports`, `flights`, `planes`, `weather`, `avg_air_time_per_month` #> Columns: 55 #> Primary keys: 3 #> Foreign keys: 3