Closed Aurelhoo closed 1 year ago
The issue is closed because it's fixed and the documentation mention clearly what you are describing.
Did I miss something?
Sorry I missed that. But still, the default value for source
should be different to not cause this unintuitive behavior when bg
is a function.
j = 4
is referring to "drat" while source = 4
is referring to "hp" and the default is source = j = 4
j only accept values from colkeys
you did not used colkeys values but an integer.
source = j = 4
That is wrong, you drop the first name, so you display p columns but the internal dataset contain p+1 columns.
colourer <- function(x) ifelse(x == 3.9, "blue", "red")
Works fine when no column is hidden
flextable(head(mtcars)) |> bg( j = 5, bg = colourer)
Created on 2023-07-26 with reprex v2.0.2
sessionInfo()
.[x] Make sure you did checked you had the latest version of the package on CRAN (and on github if issue exists with CRAN version).
[x] Make sure you searched in the open and closed issues on the github repository. I think is the same problem of this closed issue #395