Skip to content

Commit e394a88

Browse files
olivroygordonwoodhull
authored andcommitted
Avoid gt deprecated arguments
1 parent f28e58e commit e394a88

File tree

1 file changed

+11
-16
lines changed
  • docs/blog/posts/2024-07-02-beautiful-tables-in-typst/examples

1 file changed

+11
-16
lines changed

docs/blog/posts/2024-07-02-beautiful-tables-in-typst/examples/gt-cars.qmd

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,19 @@ gtcars %>%
2525
dplyr::select(model, hp, mpg_c, mpg_h, msrp) %>%
2626
gt() %>%
2727
data_color(
28-
columns = vars(hp),
29-
colors = scales::col_numeric(
30-
palette = c(
31-
"white", "orange", "red"),
32-
domain = c(500, 750))
28+
columns = hp,
29+
palette = c("white", "orange", "red"),
30+
domain = c(500, 750)
3331
) %>%
3432
data_color(
35-
columns = vars(mpg_c, mpg_h),
36-
colors = scales::col_numeric(
37-
palette = c(
38-
"white", "green"),
39-
domain = c(10, 25))
33+
columns = c(mpg_c, mpg_h),
34+
palette = c("white", "green"),
35+
domain = c(10, 25)
4036
) %>%
4137
data_color(
42-
columns = vars(msrp),
43-
colors = scales::col_numeric(
44-
palette = c(
45-
"white", "pink", "red"),
46-
domain = NULL)
38+
columns = msrp,
39+
palette = c("white", "pink", "red"),
40+
domain = NULL
4741
)
48-
```
42+
```
43+

0 commit comments

Comments
 (0)