Apply rule to multiple column
doctsh opened this issue · 2 comments
I am using condformat package to color each coloumn of a dataframe. I am able to do single column but don't know how to apply for all columns without using colnames (as they change dynamically)
I used the following code to achieve conditional column coloring for single column
data(iris)
library(condformat)
dat<-iris[c(1:5,70:75, 120:125),]
condformat(dat) %>%
rule_fill_discrete(Sepal.Width,
expression = Sepal.Width > Petal.Length)
The above code changes the color of the column (sepal.width) successfully. But what I want is to apply the same condition for all columns (for example c(1:5) where without knowing the column names. I tried like . and x etc. but nothin
Did you author this stackoverflow question as well?
Anyway I hope it addresses your question. Feel free to reply if you have problems or doubts
Yes it helps.
Thanks a lot