## -----------------------------------------------------------------------------
library(basetable)

## -----------------------------------------------------------------------------
subset(mtcars, cyl == 6, select = c("mpg", "hp", "wt"))

## -----------------------------------------------------------------------------
mtcars |>
  pick(c("mpg", "hp", "wt", "cyl")) |>
  aggregate(by = "cyl", value = c("mpg", "hp"), fun = mean)

## -----------------------------------------------------------------------------
mtcars |>
  basetable::subset(cyl == 6) |>
  basetable::pick(c("mpg", "hp", "wt")) |>
  basetable::transform(power = hp / wt)

