zeehio / condformat

R package to apply conditional formatting rules to a data.frame
Other
25 stars 6 forks source link

.col pronoun #19

Open zeehio opened 5 years ago

zeehio commented 5 years ago

I want to create a rule that applies to several columns and make the expression dependant on the column where it is applied.

Proposed syntax:

    condformat(iris) %>%
      rule_fill_discrete(c(Sepal.Length, Sepal.Width), .col > 3)

Equivalent to:

    condformat(iris) %>%
      rule_fill_discrete(Sepal.Length, Sepal.Length > 3) %>%
      rule_fill_discrete(Sepal.Width, Sepal.Width > 3)