You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a table has multiple grouping variables (and therefore the groupnames show up as Group 1 - Subgroup 1), is it possible to generate summary_rows for the group higher in the hierarchy (Group 1 in this example)?
I have tried calling out only the "higher" group in addition to the subgrouping you get with groups = TRUE but get an error.
library(tidyverse)
library(gt)
exibble %>%
mutate(subgroup= c(1,1,2,2,1,1,2,2)) %>%
gt(groupname_col= c("group", "subgroup"),
rowname_col="row") %>%
summary_rows(groups=TRUE,
columns= vars(num),
fns=list(Total=~sum(., na.rm=TRUE))) %>%
summary_rows(groups="group",
columns= vars(num),
fns=list(Total=~sum(., na.rm=TRUE)))
#> Error: All `groups` should be available in the gt object:#> * The following groups aren't present: group
When a table has multiple grouping variables (and therefore the groupnames show up as Group 1 - Subgroup 1), is it possible to generate
summary_rows
for the group higher in the hierarchy (Group 1 in this example)?I have tried calling out only the "higher" group in addition to the subgrouping you get with
groups = TRUE
but get an error.Created on 2020-04-14 by the reprex package (v0.3.0)
Thanks and congrats on getting it onto CRAN!
Steve
The text was updated successfully, but these errors were encountered: