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
It seems that the minimal change required to make it fail is to remove the groups in that example. In this example and my real-life one, there is only a single group so it shouldn't matter.
library(tidyverse)
library(gt)
countrypops %>%
dplyr::filter(
country_name=="Japan",
year<1970) %>%
dplyr::select(-contains("country")) %>%
dplyr::mutate(
decade= paste0(substr(year, 1, 3), "0s")
) %>%
gt(
rowname_col="year"
) %>%
summary_rows(
columns= vars(population),
fns=list("min", "max"),
formatter=fmt_number,
decimals=0
) %>%
tab_style(
style=list(
cell_text(style="italic"),
cell_fill(color="lightblue")
),
locations= cells_summary(
columns= vars(population),
rows=1)
)
#> Error: All column or row indices given must be present in `data_tbl`.
Created on 2020-05-11 by the reprex package (v0.3.0)