| key_by | R Documentation | 
Group by setting key of the input.
key_by(.data, ...)
## S3 method for class 'ExprBuilder'
key_by(
  .data,
  ...,
  .parse = getOption("table.express.parse", FALSE),
  .chain = getOption("table.express.chain", TRUE)
)
## S3 method for class 'data.table'
key_by(.data, ...)
.data | 
 Object to be grouped and subsequently keyed.  | 
... | 
 Arguments for the specific methods.  | 
.parse | 
 Logical. Whether to apply   | 
.chain | 
 Logical. Should a new frame be automatically chained to the expression if the clause being set already exists?  | 
Everything in ... will be wrapped in a call to list. Its contents work like Clauses for
grouping on columns. The keyby inside the data.table::data.table frame.
To see more examples, check the vignette, or the table.express-package entry.
data("mtcars")
data.table::as.data.table(mtcars) %>%
    start_expr %>%
    key_by(cyl, gear)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.