我有這個表,我想在RMD文件中使用PANDOC的PDF渲染色細胞
table = data.frame(category = c("A","B","C"), groupA = c(.2,.3,.5), groupB= c(.6,.7,.9))
table
pandoc.table(table,split.table = Inf,keep.line.breaks = TRUE)
----------------------------
category groupA groupB
---------- -------- --------
A 0.2 0.6
B 0.3 0.7
C 0.5 0.9
----------------------------
我怎樣才能顏色的「A組」和「B組」列與細胞條件格式如:
>0 and <= .2 = "green"
>.2 and <= .3 = "red"
>.3 and <= .4 = "blue"
>.4 and <= .5 = "orange"
>.5 and <= .6 = "yellow"
>.6 and <= .7 = "black"
>.7 and <= .8 = "brown"
>.8 = "white"
要渲染HTML或PDF?如果是前者,請查看[formattable](https://renkun.me/formattable/)。 – alistaire
becasue它是PDF – user3022875