0

This code from gtExtras website:

library(gt)
gt_sparkline_tab <- mtcars %>%
    dplyr::group_by(cyl) %>%
    # must end up with list of data for each row in the input dataframe
    dplyr::summarize(mpg_data = list(mpg), .groups = "drop") %>%
    gt() %>%
    gt_plt_dist(mpg_data) %>% as_latex()
gt_sparkline_tab 

gives the following error when rendering to LaTeX:

! You can't use `macro parameter character #' in restricted horizontal mode. l.355 ... circle { fill: none; stroke: # 000000; stroke-lineca...

I can't quite figure how to bypass this.

R Walser
  • 330
  • 3
  • 16
  • Most likely not possible. See [here](https://github.com/jthomasmock/gtExtras/issues/65#issuecomment-1243853960) for a related GitHub issue and the package authors response on Latex support. – stefan Aug 10 '23 at 10:55

0 Answers0