library(basetable)
basetable provides a base-style front end for tabular work with a
native C++ table engine. The core design goals are explicit semantics, compact
naming, and equal support for nested calls and native |> pipelines.
Most workflows need only a small set of regular verbs:
| Task | Canonical functions |
|:--|:--|
| Inspect | preview(), describe(), missingness() |
| Keep rows | subset() |
| Keep or remove columns | pick(), drop() |
| Create columns | transform() |
| Order rows | orderrows() |
| Summarise | aggregate(), summaries(), count() |
| Join | merge(), antimerge(), semimerge() |
| Reshape | tolong(), towide() |
| Validate | assertcomplete(), assertunique(), assertrows() |
These are canonical names, not one layer of aliases among several grammars.
Each function accepts a table as its first argument, uses character vectors
for column specifications, and returns a bt_table. Those regular rules
make pipelines compact for people and make function selection predictable for
program-generating tools such as language models.
The package is intentionally focused on in-memory table manipulation, exploration, and validation. Read and write files with base R or a dedicated I/O package, then pass the resulting data frame to basetable. Domain-specific parsing and validation remain the responsibility of focused packages.
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)
Compact names intentionally overlap with base R and other table packages. If more than one is attached, qualify the function rather than introducing a new alias or changing grammars mid-pipeline.
mtcars |> basetable::subset(cyl == 6) |> basetable::pick(c("mpg", "hp", "wt")) |> basetable::transform(power = hp / wt)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.