haozhu233 / kableExtra

Construct Complex Table with knitr::kable() + pipe.
https://haozhu233.github.io/kableExtra/
Other
688 stars 147 forks source link

use_kable_in_shiny vignette has slight bug #854

Open byandell opened 3 months ago

byandell commented 3 months ago

Describe the bug The gist for use_kable_in_shiny generates a Warning: Error in htmlTable_add_header_above: The new header row you provided has a total of 12 columns but the original kable_input has 13. see https://cran.r-project.org/web/packages/kableExtra/vignettes/use_kable_in_shiny.html

This can be resolved by inserting tibble::remove_rownames() %>% in line after mutate(car = rownames(.)) %>%

To Reproduce

[# code to reproduce the bug.](shiny::runGist("https://gist.github.com/haozhu233/9e675e1a8a1bb4744f9ebc9246a2366b"))
dmurdoch commented 3 months ago

Thanks, I've fixed the code in the vignette. I don't seem to have permissions to fix the gist, so the link still points to the bad version.