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
relocate(.data, ..., .before = NULL, .after = NULL)
# 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, ...)
# S3 method for zoomed_dm
compute(x, ...)
object of class zoomed_dm
see corresponding function in package dplyr or tidyr
<tidy-select
> Destination of
columns selected by ...
. Supplying neither will move columns to the
left-hand side; specifying both is an error.
<tidy-select
> Destination of
columns selected by ...
. Supplying neither will move columns to the
left-hand side; specifying both is an error.
For distinct.zoomed_dm()
: see dplyr::distinct
For slice.zoomed_dm
: Logical, if TRUE
, the primary key will be retained during this transformation. If FALSE
, it will be dropped.
By default, the value is NULL
, which causes the function to issue a message in case a primary key is available for the zoomed table.
This argument is specific for the slice.zoomed_dm()
method.
For ungroup.zoomed_dm
: object of class zoomed_dm
<data-masking
> Frequency weights.
Can be NULL
or a variable:
If NULL
(the default), counts the number of rows in each group.
If a variable, computes sum(wt)
for each group.
If TRUE
, will show the largest groups at the top.
The name of the new column in the output.
If omitted, it will default to n
. If there's already a column called n
,
it will error, and require you to specify the name.
For count()
: if FALSE
will include counts for empty groups
(i.e. for levels of factors that don't exist in the data). Deprecated in
add_count()
since it didn't actually affect the output.
A variable specified as:
a literal variable name
a positive integer, giving the position counting from the left
a negative integer, giving the position counting from the right.
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).
# NOT RUN {
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")
# }
Run the code above in your browser using DataLab