gt_book

Author

Jane Doe

Published

November 10, 2022

1 Tables (lots of them)

Before as_raw_html() was able to include images or custom styles like gtExtras::gt_theme_538() with inline CSS, it was a bit tricky to include tables in Quarto docs. I’ve spent some time trying to manually change all table classes in the html so that Quarto cannot overwrite it. Still, some stuff like line heights are still inherited from the surrounding Quarto doc (regardless of whether you use as_raw_html() or my function). I solved this issue by wrapping the code chunk into a div using style="all:initial;" (maybe there’s a more elegant solution).

In some cases, as_raw_html() does not seem to adjust line styles. Below, I’ve tested a few (non-minimal) table examples to see how the formatting may or may not change. In my examples, there were mainly two issues.

  • as_raw_html() still needs a surrounding div with style="all:initial;"
  • Small line heights lead to scroll bars that are not there when creating the table outside of Quarto
  • Line styles are not adjusted with as_raw_html().

1.1 My main function

The new as_raw_html() is probably preferable to my own function (as it likely won’t work with nested tables). But since my function does not have the issue with the line formatting I’ve kept it here for comparisons.

Code
make_tbl_quarto_robust <- function(tbl) {
  # Get tbl html code (without the inline stuff)
  tbl_html <- tbl |>
    as_raw_html(inline_css = FALSE) 
  
  # Find table id
  tbl_id <-  str_match(tbl_html, 'id="(.*)"\\s')[,2] 
  
  # Split html so that we only replace strings in the css part at first
  # That's important for performance
  split_html <- tbl_html |> 
    str_split_1('<table class="gt_table".{0,}>')
  css_part <- split_html[1] |> 
    str_split_1('<style>')
  
  # Create regex to add table id
  my_regex <- str_c('(', tbl_id, ' )?(.* \\{)')
  replaced_css <- css_part[2] |>
    # Make global html changes more specific
    str_replace_all('html \\{', str_c(tbl_id, ' .gt_table {')) |> 
    # Make changes to everything specific to the table id
    str_replace_all(my_regex, str_c('\\#', tbl_id, ' \\2')) |> 
    # Replace duplicate names 
    str_replace_all(
      str_c('\\#', tbl_id, ' \\#', tbl_id),
      str_c('\\#', tbl_id)
    )
  
  # Put split html back together
  str_c(
    css_part[1], '<style>', 
    replaced_css, '<table class="gt_table">', 
    split_html[2]
  ) |> 
    # Rename all gt_* classes to new_gt_*
    str_replace_all('(\\.|class="| )gt', '\\1new_gt') |> 
    # Reformat as html
    html()
}

1.2 Line height issue

In this table, the line heights seem to still be inherited if we don’t wrap our div in style="all:initial;". Beware that the screenshoted table uses full width whereas the other tables are restricted to the page column of this Quarto doc.

Code
library(tidyverse)
library(gt)
library(gtExtras)

penguins <- palmerpenguins::penguins |> filter(!is.na(sex))
counts <- penguins |> 
  mutate(year = as.character(year)) |> 
  group_by(species, island, sex, year) |> 
  summarise(n = n(), .groups = 'drop')


counts_wider <- counts |> 
  pivot_wider(
    names_from = c(species, sex),
    values_from = n
  ) |> 
  arrange(year)  |> # This will arrange each island as 07-08-09-total
  mutate(island = paste('Island:', island)) |> 
  ungroup()

tbl <- counts_wider |> 
  mutate(
    island = str_remove(island, 'Island: '),
    across(.cols = -(1:2), .fns = ~replace_na(., replace = 0))
  ) |> 
  arrange(island) |> 
  gt(id = 'asdsdag') |> 
  cols_label(
    'island' = 'Island',
    year = 'Year',
    Adelie_female = 'Adelie (female)',
    Adelie_male = 'Adelie (male)',
    Chinstrap_female = 'Chinstrap (female)',
    Chinstrap_male = 'Chinstrap (male)',
    Gentoo_female = 'Gentoo (female)',
    Gentoo_male = 'Gentoo (male)',
  ) |> 
  tab_header(title = 'Penguins in the Palmer Archipelago') |> 
  tab_options(
    heading.align = 'left'
  ) |> 
  gt_theme_538()

Penguins in the Palmer Archipelago
Island Year Adelie (female) Adelie (male) Chinstrap (female) Chinstrap (male) Gentoo (female) Gentoo (male)
Biscoe 2007 5 5 0 0 16 17
Biscoe 2008 9 9 0 0 22 23
Biscoe 2009 8 8 0 0 20 21
Dream 2007 9 10 13 13 0 0
Dream 2008 8 8 9 9 0 0
Dream 2009 10 10 12 12 0 0
Torgersen 2007 8 7 0 0 0 0
Torgersen 2008 8 8 0 0 0 0
Torgersen 2009 8 8 0 0 0 0
Penguins in the Palmer Archipelago
Island Year Adelie (female) Adelie (male) Chinstrap (female) Chinstrap (male) Gentoo (female) Gentoo (male)
Biscoe 2007 5 5 0 0 16 17
Biscoe 2008 9 9 0 0 22 23
Biscoe 2009 8 8 0 0 20 21
Dream 2007 9 10 13 13 0 0
Dream 2008 8 8 9 9 0 0
Dream 2009 10 10 12 12 0 0
Torgersen 2007 8 7 0 0 0 0
Torgersen 2008 8 8 0 0 0 0
Torgersen 2009 8 8 0 0 0 0
Penguins in the Palmer Archipelago
Island Year Adelie (female) Adelie (male) Chinstrap (female) Chinstrap (male) Gentoo (female) Gentoo (male)
Biscoe 2007 5 5 0 0 16 17
Biscoe 2008 9 9 0 0 22 23
Biscoe 2009 8 8 0 0 20 21
Dream 2007 9 10 13 13 0 0
Dream 2008 8 8 9 9 0 0
Dream 2009 10 10 12 12 0 0
Torgersen 2007 8 7 0 0 0 0
Torgersen 2008 8 8 0 0 0 0
Torgersen 2009 8 8 0 0 0 0

1.3 Narrow heights

It seems that narrow line heights lead to scroll bars in all cases. The original table does not have that. Though, the initial table has full width and is not restricted. This may cause the issue?

Code
filtered_penguins <- palmerpenguins::penguins |>
    filter(!is.na(sex))

penguin_weights <- palmerpenguins::penguins |>
  filter(!is.na(sex)) |>
  group_by(species) |>
  summarise(
    Min = min(body_mass_g),
    Mean = mean(body_mass_g) |> round(digits = 2),
    Max = max(body_mass_g)
  ) |>
  mutate(species = as.character(species), Distribution = species) |>
  rename(Species = species)


plot_density_species <- function(species, variable) {
  full_range <- filtered_penguins |>
    pull({{variable}}) |>
    range()

  filtered_penguins |>
    filter(species == !!species) |>
    ggplot(aes(x = {{variable}}, y = species)) +
    geom_violin(fill = 'dodgerblue4') +
    theme_minimal() +
    scale_y_discrete(breaks = NULL) +
    scale_x_continuous(breaks = NULL) +
    labs(x = element_blank(), y = element_blank()) +
    coord_cartesian(xlim = full_range)
}

penguins <- penguin_weights |>
  gt() |>
  tab_spanner(
    label = 'Penguin\'s Weight',
    columns = -Species
  ) |>
  text_transform(
    locations = cells_body(columns = 'Distribution'),
    # Create a function that takes the a column as input
    # and gives a list of ggplots as output
    fn = function(column) {
      map(column, ~plot_density_species(., body_mass_g)) |>
        ggplot_image(height = px(50), aspect_ratio = 3)
    }
  ) |>
  tab_options(table.font.names = 'Merriweather') |>
  opt_css(
    '.gt_table {
      line-height:10px;
    }'
  )

Species Penguin's Weight
Min Mean Max Distribution
Adelie 2850 3706.16 4775
Chinstrap 2700 3733.09 4800
Gentoo 3950 5092.44 6300
Species Penguin's Weight
Min Mean Max Distribution
Adelie 2850 3706.16 4775
Chinstrap 2700 3733.09 4800
Gentoo 3950 5092.44 6300
Species Penguin's Weight
Min Mean Max Distribution
Adelie 2850 3706.16 4775
Chinstrap 2700 3733.09 4800
Gentoo 3950 5092.44 6300

1.4 Lines do not format correctly

In all cases, the line between two countries looks thinner than in the screenshot. With as_raw_html() there is also a superfluous line below the last country in a continent.

Code
library(svglite)
set.seed(34534)
lifeexp_selected_countries <- gapminder::gapminder |>
  janitor::clean_names() |>
  select(continent, country, year, life_exp) |>
  group_by(continent, country) |>
  nest() |>
  group_by(continent) |>
  slice_sample(n = 2) |>
  unnest(data) |>
  pivot_wider(names_from = year, names_prefix = 'year', values_from = life_exp) |>
  ungroup() |>
  select(continent, country, ends_with('7'))


new_colnames <- colnames(lifeexp_selected_countries) |>
  str_remove('(country|year)')
names(new_colnames) <- colnames(lifeexp_selected_countries)


all_gapminder_data_selected_countries <- gapminder::gapminder |>
  filter(
    str_sub(year, start = 4) == '7',
    country %in% unique(lifeexp_selected_countries$country)
  )

timeline_data <- all_gapminder_data_selected_countries |>
  group_by(continent, country) |>
  summarise(
    timeline = list(lifeExp)
  )

lifeexp_comparison_data <- gapminder::gapminder |>
  filter(year == 2007) |>
  group_by(continent) |>
  summarise(
    mean_life_exp_2007 = mean(lifeExp)
  )

joined_data <- lifeexp_selected_countries |>
  left_join(timeline_data) |>
  left_join(lifeexp_comparison_data) |>
  mutate(rep2007 = year2007)



html_text <- 'Comparison 2007<br> <p style="color:#104e8b;display:inline;"> continent mean</p> | <p style="color:#1e90ff;display:inline;"> country</p>'

sparkline_plot <- joined_data |>
  arrange(year2007) |>
  select(-c(mean_life_exp_2007, rep2007)) |>
  ### Other data used here
  gt(groupname_col = 'continent') |>
  cols_label(.list = new_colnames) |>
  fmt_number(columns = -c(country, timeline), decimals = 2) |>
  gt_theme_538() |>
  tab_header(
    title = 'Life Expectancies over time',
    subtitle = 'Data is courtesy of the Gapminder foundation'
  ) |>
  tab_options(
    column_labels.font.weight = 'bold',
    table.font.size = 16,
    data_row.padding = px(3),
    row_group.padding = px(4)
  ) |>
  gt_color_rows(
    columns = c(year2007, year1957),
    domain = c(30, 85),
    palette = thematic::okabe_ito(4)[c(4, 2)]
  ) |>
  ### Add sparklines
  gt_plt_sparkline(
    column = timeline,
    palette = c("grey40", "grey40", "grey40", "dodgerblue1", "grey40"),
    fig_dim = c(5, 28)
  )

Life Expectancies over time
Data is courtesy of the Gapminder foundation
1957 1967 1977 1987 1997 2007 timeline
Africa
Sierra Leone 31.57 34.11 36.79 40.01 39.90 42.57 42.6
Egypt 44.44 49.29 53.32 59.80 67.22 71.34 71.3
Americas
Jamaica 62.61 67.51 70.11 71.77 72.26 72.57 72.6
Nicaragua 45.43 51.88 57.47 62.01 68.43 72.90 72.9
Asia
Syria 48.28 53.66 61.20 66.97 71.53 74.14 74.1
Singapore 63.18 67.95 70.80 73.56 77.16 79.97 80.0
Europe
United Kingdom 70.42 71.36 72.76 75.01 77.22 79.42 79.4
Netherlands 72.99 73.82 75.24 76.83 78.03 79.76 79.8
Oceania
New Zealand 70.26 71.52 72.22 74.32 77.55 80.20 80.2
Australia 70.33 71.10 73.49 76.32 78.83 81.23 81.2
Life Expectancies over time
Data is courtesy of the Gapminder foundation
1957 1967 1977 1987 1997 2007 timeline
Africa
Sierra Leone 31.57 34.11 36.79 40.01 39.90 42.57 42.6
Egypt 44.44 49.29 53.32 59.80 67.22 71.34 71.3
Americas
Jamaica 62.61 67.51 70.11 71.77 72.26 72.57 72.6
Nicaragua 45.43 51.88 57.47 62.01 68.43 72.90 72.9
Asia
Syria 48.28 53.66 61.20 66.97 71.53 74.14 74.1
Singapore 63.18 67.95 70.80 73.56 77.16 79.97 80.0
Europe
United Kingdom 70.42 71.36 72.76 75.01 77.22 79.42 79.4
Netherlands 72.99 73.82 75.24 76.83 78.03 79.76 79.8
Oceania
New Zealand 70.26 71.52 72.22 74.32 77.55 80.20 80.2
Australia 70.33 71.10 73.49 76.32 78.83 81.23 81.2
Life Expectancies over time
Data is courtesy of the Gapminder foundation
1957 1967 1977 1987 1997 2007 timeline
Africa
Sierra Leone 31.57 34.11 36.79 40.01 39.90 42.57 42.6
Egypt 44.44 49.29 53.32 59.80 67.22 71.34 71.3
Americas
Jamaica 62.61 67.51 70.11 71.77 72.26 72.57 72.6
Nicaragua 45.43 51.88 57.47 62.01 68.43 72.90 72.9
Asia
Syria 48.28 53.66 61.20 66.97 71.53 74.14 74.1
Singapore 63.18 67.95 70.80 73.56 77.16 79.97 80.0
Europe
United Kingdom 70.42 71.36 72.76 75.01 77.22 79.42 79.4
Netherlands 72.99 73.82 75.24 76.83 78.03 79.76 79.8
Oceania
New Zealand 70.26 71.52 72.22 74.32 77.55 80.20 80.2
Australia 70.33 71.10 73.49 76.32 78.83 81.23 81.2

1.5 Additional lines

In this one, there’s the problem of additional lines again.

Code
brands <- tibble(
  Brand = c('twitter', 'facebook', 'linkedin', 'github'),
  color = c('#1DA1F2', '#4267B2', '#0077B5', '#333' )
) |>
  mutate(
    # Use html() function here so that {gt} knows what's going on
    Emoji = map2(Brand, color, ~html(fontawesome::fa(.x, fill = .y))),
    Brand = str_to_title(Brand)
  ) |>
  select(-color)

brands_table <- brands |>
  gt()  |>
   # This part makes emojis larger and adds titles and footnote
  tab_style(
    style = list(cell_text(size = px(40))),
    locations = cells_body(columns = 'Emoji')
  ) |>
  tab_header(
    title = 'Brand table',
    subtitle = 'It\'s surprisingly simple to include fontawesome icons in {gt} tables'
  ) |>
  tab_options(
    table.font.names = 'Merriweather',
    table.font.weight = 'bold',
    table_body.hlines.style = 'dashed',
    table_body.hlines.width = px(1),
    table_body.hlines.color =  'white',
    table_body.border.top.color = 'white',
    table_body.border.top.style = px(1),
    heading.border.bottom.width = px(1),
    heading.border.bottom.color =  'white',
    column_labels.border.bottom.width = px(1),
    column_labels.border.bottom.color =  'white',
    column_labels.font.weight = 'bold',
    table.border.top.style = 'none',
    table_body.border.bottom.color = 'white'
  )

Brand table
It's surprisingly simple to include fontawesome icons in {gt} tables
Brand Emoji
Twitter
Facebook
Linkedin
Github
Brand table
It's surprisingly simple to include fontawesome icons in {gt} tables
Brand Emoji
Twitter
Facebook
Linkedin
Github
Brand table
It's surprisingly simple to include fontawesome icons in {gt} tables
Brand Emoji
Twitter
Facebook
Linkedin
Github

1.6 Body top-border-width is off

For some reason, Body top-border is off in all cases. Also, lines are not dashed when using as_raw_html().

Code
brands_tbl_background <- brands |>
  gt(id = 'adfgadfgasf')  |>
   # This part makes emojis larger and adds titles and footnote
  tab_style(
    style = list(cell_text(size = px(40))),
    locations = cells_body(columns = 'Emoji')
  ) |>
  tab_header(
    title = 'Brand table',
    subtitle = 'It\'s surprisingly simple to include fontawesome icons in {gt} tables'
  ) |>
  tab_options(
    table.font.names = 'Merriweather',
    table.font.weight = 'bold',
    heading.align = 'left',
    table_body.hlines.style = 'dashed',
    table_body.hlines.width = px(1),
    table_body.hlines.color =  'white',
    table_body.border.top.color = 'white',
    table_body.border.top.style = px(1),
    heading.border.bottom.width = px(1),
    heading.border.bottom.color =  'white',
    column_labels.border.bottom.width = px(1),
    column_labels.border.bottom.color =  'white',
    column_labels.font.weight = 'bold',
    table.border.top.style = 'none',
    table_body.border.bottom.color = 'white'
  ) |>
  opt_css(
    css = '
    .gt_table {
      background: linear-gradient(135deg, #FFFB7D, #9599E2);
    }

    #adfgadfgasf .gt_heading, #adfgadfgasf .gt_col_heading {
      background:transparent;
    }

    #adfgadfgasf .gt_col_headings {
      border-top-color: white;
      border-top-width: 1px;
    }

    '
  )

Brand table
It's surprisingly simple to include fontawesome icons in {gt} tables
Brand Emoji
Twitter
Facebook
Linkedin
Github
Brand table
It's surprisingly simple to include fontawesome icons in {gt} tables
Brand Emoji
Twitter
Facebook
Linkedin
Github
Brand table
It's surprisingly simple to include fontawesome icons in {gt} tables
Brand Emoji
Twitter
Facebook
Linkedin
Github

1.7 Body top-border can be fixed manually

Good news is that adding css code with opt_css() can fix most small issues I believe. Here that’s demonstrated with the previous body-top-border issue.

Brand table
It's surprisingly simple to include fontawesome icons in {gt} tables
Brand Emoji
Twitter
Facebook
Linkedin
Github
Brand table
It's surprisingly simple to include fontawesome icons in {gt} tables
Brand Emoji
Twitter
Facebook
Linkedin
Github
Brand table
It's surprisingly simple to include fontawesome icons in {gt} tables
Brand Emoji
Twitter
Facebook
Linkedin
Github

1.8 Session info

─ Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.2.2 (2022-10-31)
 os       Ubuntu 20.04.5 LTS
 system   x86_64, linux-gnu
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Europe/Berlin
 date     2022-11-11
 pandoc   2.19.2 @ /usr/lib/rstudio/bin/quarto/bin/tools/ (via rmarkdown)

─ Packages ───────────────────────────────────────────────────────────────────
 ! package        * version    date (UTC) lib source
 P assertthat       0.2.1      2019-03-21 [?] CRAN (R 4.0.0)
 P backports        1.4.1      2021-12-13 [?] CRAN (R 4.1.2)
 P base64enc        0.1-3      2015-07-28 [?] CRAN (R 4.0.0)
 P broom            1.0.1      2022-08-29 [?] CRAN (R 4.2.1)
 P cellranger       1.1.0      2016-07-27 [?] CRAN (R 4.0.0)
 P chromote         0.1.1      2022-09-07 [?] CRAN (R 4.2.1)
 P cli              3.4.1      2022-09-23 [?] CRAN (R 4.2.1)
 P colorspace       2.0-3      2022-02-21 [?] CRAN (R 4.1.2)
 P crayon           1.5.2      2022-09-29 [?] CRAN (R 4.2.1)
 P curl             4.3.3      2022-10-06 [?] CRAN (R 4.2.1)
 P DBI              1.1.3      2022-06-18 [?] CRAN (R 4.2.1)
 P dbplyr           2.2.1      2022-06-27 [?] CRAN (R 4.2.1)
 P digest           0.6.30     2022-10-18 [?] CRAN (R 4.2.1)
 P dplyr          * 1.0.10     2022-09-01 [?] CRAN (R 4.2.1)
 P ellipsis         0.3.2      2021-04-29 [?] CRAN (R 4.0.5)
 P evaluate         0.18       2022-11-07 [?] CRAN (R 4.2.2)
 P fansi            1.0.3      2022-03-24 [?] CRAN (R 4.1.3)
 P farver           2.1.1      2022-07-06 [?] CRAN (R 4.2.1)
 P fastmap          1.1.0      2021-01-25 [?] CRAN (R 4.0.3)
 P fontawesome      0.4.0      2022-10-25 [?] CRAN (R 4.2.2)
 P forcats        * 0.5.2      2022-08-19 [?] CRAN (R 4.2.1)
 P fs               1.5.2      2021-12-08 [?] CRAN (R 4.1.2)
 P gapminder        0.3.0      2017-10-31 [?] CRAN (R 4.2.1)
 P gargle           1.2.1      2022-09-08 [?] CRAN (R 4.2.1)
 P generics         0.1.3      2022-07-05 [?] CRAN (R 4.2.1)
 P ggplot2        * 3.4.0      2022-11-04 [?] CRAN (R 4.2.2)
 P glue             1.6.2      2022-02-24 [?] CRAN (R 4.1.2)
 P googledrive      2.0.0      2021-07-08 [?] CRAN (R 4.1.0)
 P googlesheets4    1.0.1      2022-08-13 [?] CRAN (R 4.2.1)
   gt             * 0.7.0.9000 2022-11-11 [1] Github (rstudio/gt@a4e108c)
 P gtable           0.3.1      2022-09-01 [?] CRAN (R 4.2.1)
 P gtExtras       * 0.4.3      2022-11-05 [?] CRAN (R 4.2.2)
 P haven            2.5.1      2022-08-22 [?] CRAN (R 4.2.1)
 P hms              1.1.2      2022-08-19 [?] CRAN (R 4.2.1)
 P htmltools        0.5.3      2022-07-18 [?] CRAN (R 4.2.1)
 P htmlwidgets      1.5.4      2021-09-08 [?] CRAN (R 4.2.1)
 P httr             1.4.4      2022-08-17 [?] CRAN (R 4.2.1)
 P janitor          2.1.0      2021-01-05 [?] CRAN (R 4.2.0)
 P jsonlite         1.8.3      2022-10-21 [?] CRAN (R 4.2.1)
   juicyjuice       0.1.0      2022-11-10 [1] CRAN (R 4.2.2)
 P knitr            1.40       2022-08-24 [?] CRAN (R 4.2.1)
 P labeling         0.4.2      2020-10-20 [?] CRAN (R 4.0.3)
 P later            1.3.0      2021-08-18 [?] CRAN (R 4.2.0)
 P lifecycle        1.0.3      2022-10-07 [?] CRAN (R 4.2.1)
 P lubridate        1.9.0      2022-11-06 [?] CRAN (R 4.2.2)
 P magrittr         2.0.3      2022-03-30 [?] CRAN (R 4.1.3)
 P modelr           0.1.9      2022-08-19 [?] CRAN (R 4.2.1)
 P munsell          0.5.0      2018-06-12 [?] CRAN (R 4.0.0)
 P paletteer        1.5.0      2022-10-19 [?] CRAN (R 4.2.2)
 P palmerpenguins   0.1.1      2022-08-15 [?] CRAN (R 4.2.1)
 P pillar           1.8.1      2022-08-19 [?] CRAN (R 4.2.1)
 P pkgconfig        2.0.3      2019-09-22 [?] CRAN (R 4.0.0)
 P processx         3.8.0      2022-10-26 [?] CRAN (R 4.2.2)
 P promises         1.2.0.1    2021-02-11 [?] CRAN (R 4.2.0)
 P ps               1.7.2      2022-10-26 [?] CRAN (R 4.2.2)
 P purrr          * 0.3.5      2022-10-06 [?] CRAN (R 4.2.1)
 P R6               2.5.1      2021-08-19 [?] CRAN (R 4.1.1)
 P ragg             1.2.4      2022-10-24 [?] CRAN (R 4.2.2)
 P Rcpp             1.0.9      2022-07-08 [?] CRAN (R 4.2.1)
 P readr          * 2.1.3      2022-10-01 [?] CRAN (R 4.2.1)
 P readxl           1.4.1      2022-08-17 [?] CRAN (R 4.2.1)
 P rematch2         2.1.2      2020-05-01 [?] CRAN (R 4.0.0)
   renv             0.15.5     2022-05-26 [1] CRAN (R 4.2.0)
 P reprex           2.0.2      2022-08-17 [?] CRAN (R 4.2.1)
 P rlang            1.0.6      2022-09-24 [?] CRAN (R 4.2.1)
 P rmarkdown        2.18       2022-11-09 [?] CRAN (R 4.2.2)
 P rstudioapi       0.14       2022-08-22 [?] CRAN (R 4.2.1)
 P rvest            1.0.3      2022-08-19 [?] CRAN (R 4.2.1)
 P sass             0.4.2      2022-07-16 [?] CRAN (R 4.2.1)
 P scales           1.2.1      2022-08-20 [?] CRAN (R 4.2.1)
 P sessioninfo      1.2.2      2021-12-06 [?] CRAN (R 4.2.1)
 P snakecase        0.11.0     2019-05-25 [?] CRAN (R 4.2.0)
 P stringi          1.7.8      2022-07-11 [?] CRAN (R 4.2.1)
 P stringr        * 1.4.1.9000 2022-11-09 [?] Github (tidyverse/stringr@f482fb0)
 P svglite        * 2.1.0      2022-02-03 [?] CRAN (R 4.2.1)
 P systemfonts      1.0.4      2022-02-11 [?] CRAN (R 4.1.2)
 P textshaping      0.3.6      2021-10-13 [?] CRAN (R 4.2.1)
 P thematic         0.1.2.1    2021-06-09 [?] CRAN (R 4.2.0)
 P tibble         * 3.1.8      2022-07-22 [?] CRAN (R 4.2.1)
 P tidyr          * 1.2.1      2022-09-08 [?] CRAN (R 4.2.1)
 P tidyselect       1.2.0      2022-10-10 [?] CRAN (R 4.2.1)
 P tidyverse      * 1.3.2      2022-07-18 [?] CRAN (R 4.2.1)
 P timechange       0.1.1      2022-11-04 [?] CRAN (R 4.2.2)
 P tzdb             0.3.0      2022-03-28 [?] CRAN (R 4.1.3)
 P utf8             1.2.2      2021-07-24 [?] CRAN (R 4.1.0)
   V8               4.2.2      2022-11-03 [1] CRAN (R 4.2.2)
 P vctrs            0.5.0.9000 2022-11-09 [?] Github (r-lib/vctrs@ece04d3)
 P webshot2       * 0.1.0      2022-05-18 [?] CRAN (R 4.2.1)
 P websocket        1.4.1      2021-08-18 [?] CRAN (R 4.2.1)
 P withr            2.5.0      2022-03-03 [?] CRAN (R 4.1.3)
 P xfun             0.34       2022-10-18 [?] CRAN (R 4.2.2)
 P xml2             1.3.3      2021-11-30 [?] CRAN (R 4.1.2)
 P yaml             2.3.6      2022-10-18 [?] CRAN (R 4.2.1)

 [1] /media/albert/Files/NextCloud/R Projects/gt_book/renv/library/R-4.2/x86_64-pc-linux-gnu
 [2] /usr/lib/R/library

 P ── Loaded and on-disk path mismatch.

──────────────────────────────────────────────────────────────────────────────


[✓] Checking Quarto installation......OK
      Version: 1.2.267
      Path: /opt/quarto/bin


(|) Checking basic markdown render....
(/) Checking basic markdown render....
[✓] Checking basic markdown render....OK


[✓] Checking Python 3 installation....OK
      Version: 3.8.10
      Path: /usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter


(|) Checking R installation...........
(/) Checking R installation...........
(-) Checking R installation...........
(\) Checking R installation...........
[✓] Checking R installation...........OK
      Version: 4.2.2
      Path: /usr/lib/R
      LibPaths:
        - /media/albert/Files/NextCloud/R Projects/gt_book/renv/library/R-4.2/x86_64-pc-linux-gnu
        - /usr/lib/R/library
      rmarkdown: 2.18


(|) Checking Knitr engine render......
(/) Checking Knitr engine render......
(-) Checking Knitr engine render......
(\) Checking Knitr engine render......
(|) Checking Knitr engine render......
(/) Checking Knitr engine render......
(-) Checking Knitr engine render......
(\) Checking Knitr engine render......
(|) Checking Knitr engine render......
(/) Checking Knitr engine render......
[✓] Checking Knitr engine render......OK