DataSHIELD implentation of dplyr::group_by.

ds.group_by(
  df.name = NULL,
  expr,
  .add = FALSE,
  .drop = TRUE,
  newobj = NULL,
  datasources = NULL
)

Arguments

df.name

Character specifying a serverside data frame or tibble.

expr

Variables or computations to group by.

.add

When FALSE, the default, group_by() will override existing groups. To add to the existing groups, use .add = TRUE.

.drop

Drop groups formed by factor levels that don't appear in the data? The default is TRUE except when .data has been previously grouped with .drop = FALSE.

newobj

Character specifying name for new server-side data frame.

datasources

DataSHIELD connections object.

Value

An object with the name specified by the newobj argument is written serverside.

Examples

if (FALSE) {
ds.group_by(
  df.name = "mtcars",
  expr = list(mpg, cyl),
  newobj = "grouped_df"
)
}