dplyr_table_manipulation {dm} | R Documentation |
dplyr table manipulation methods for zoomed dm objects
Description
Use these methods without the '.dm_zoomed' suffix (see examples).
Usage
## S3 method for class 'dm_zoomed'
filter(.data, ...)
## S3 method for class 'dm_zoomed'
mutate(.data, ...)
## S3 method for class 'dm_zoomed'
transmute(.data, ...)
## S3 method for class 'dm_zoomed'
select(.data, ...)
## S3 method for class 'dm_zoomed'
relocate(.data, ..., .before = NULL, .after = NULL)
## S3 method for class 'dm_zoomed'
rename(.data, ...)
## S3 method for class 'dm_zoomed'
distinct(.data, ..., .keep_all = FALSE)
## S3 method for class 'dm_zoomed'
arrange(.data, ...)
## S3 method for class 'dm_zoomed'
slice(.data, ..., .keep_pk = NULL)
## S3 method for class 'dm_zoomed'
group_by(.data, ...)
## S3 method for class 'dm_keyed_tbl'
group_by(.data, ...)
## S3 method for class 'dm_zoomed'
ungroup(x, ...)
## S3 method for class 'dm_zoomed'
summarise(.data, ...)
## S3 method for class 'dm_keyed_tbl'
summarise(.data, ...)
## S3 method for class 'dm_zoomed'
count(
x,
...,
wt = NULL,
sort = FALSE,
name = NULL,
.drop = group_by_drop_default(x)
)
## S3 method for class 'dm_zoomed'
tally(x, ...)
## S3 method for class 'dm_zoomed'
pull(.data, var = -1, ...)
## S3 method for class 'dm_zoomed'
compute(x, ...)
Arguments
.data |
object of class |
... |
see corresponding function in package dplyr or tidyr |
.before , .after |
< |
.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 |
Handling of factor levels that don't appear in the data, passed
on to For 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). |
Examples
zoomed <- dm_nycflights13() %>%
dm_zoom_to(flights) %>%
group_by(month) %>%
arrange(desc(day)) %>%
summarize(avg_air_time = mean(air_time, na.rm = TRUE))
zoomed
dm_insert_zoomed(zoomed, new_tbl_name = "avg_air_time_per_month")