小编And*_*den的帖子

Set asymmetric midpoint for data_color in gt table

I am trying to recreate a simple table from 538 using the gt package. I want to use 0 as the midpoint of the domain of the color scale and set that to white but 0 is not the midpoint of the actual domain.

df <- tribble(
  ~SEASON, ~ACC, ~BIG_10, ~BIG_12, ~PAC_12, ~SEC,
  2019, .02, -.05, 0, .02, .04,
  2018, -.06, .07, .07, .02, .01,
  2017, .05, -.04, .06, .16, .04,
  2016, 0, .05, -.04, -.02, .07,
  2015, .06, -.04, …
Run Code Online (Sandbox Code Playgroud)

r colors gt

5
推荐指数
1
解决办法
998
查看次数

标签 统计

colors ×1

gt ×1

r ×1