inst/doc/getting-started.R

## -----------------------------------------------------------------------------
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)

Try the basetable package in your browser

Any scripts or data that you put into this service are public.

basetable documentation built on Sept. 18, 2026, 9:13 a.m.