Closed asbates closed 1 month ago
@asbates this isn't a bug - it's just that the table isn't built and the error here isn't intuitive:
library(Tplyr)
t <- tplyr_table(mtcars, gear)
layers <- list(
group_count(t, cyl),
group_desc(t, hp)
)
t <- add_layers(t, !!!layers)
build(t)
header_n(t)
The header N table just isn't computed until build time.
Prerequisites
For more information, see the
CONTRIBUTING
guide.Description
When adding layers programmatically,
Tplyr
is not computing (or not finding) theheader_n
values.Steps to Reproduce (Bug Report Only)
Created on 2024-08-27 with reprex v2.1.1
Expected behavior: I get a data frame with the
header_n
values.Actual behavior: I get an error.
Versions
You can get this information from executing
sessionInfo()
.