condformat: Conditional formatting for data frames

Description Usage Arguments Value Examples

View source: R/condformat.R

Description

A condformat_tbl object is a data frame with attributes regarding the formatting of their cells, that can be viewed when the condformat_tbl object is printed.

Usage

1

Arguments

x

A matrix or data.frame

Value

The condformat_tbl object. This object can be piped to apply conditional formatting rules. It can also be used as a conventional data frame.

The condformat_tbl print method generates an htmlTable, to be viewed using RStudio Viewer or an HTML browser, as available.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data(iris)
cf <- condformat(iris[1:5,])
## Not run: 
print(cf)

## End(Not run)

cf <- condformat(iris[1:5,]) %>% rule_fill_gradient(Sepal.Length)
## Not run: 
print(cf)

## End(Not run)

cf <- condformat(iris[1:5,]) %>%
 rule_fill_discrete(Sepal.Length, expression=Sepal.Width > 2)
## Not run: 
print(cf)

## End(Not run)

Example output

sh: 0: Can't open /dev/null
sh: 0: Can't open /dev/null
sh: 0: Can't open /dev/null

condformat documentation built on July 8, 2020, 6:20 p.m.