Title: | Conditional Formatting in Data Frames |
---|---|
Description: | Apply and visualize conditional formatting to data frames in R. It renders a data frame with cells formatted according to criteria defined by rules, using a tidy evaluation syntax. The table is printed either opening a web browser or within the 'RStudio' viewer if available. The conditional formatting rules allow to highlight cells matching a condition or add a gradient background to a given column. This package supports both 'HTML' and 'LaTeX' outputs in 'knitr' reports, and exporting to an 'xlsx' file. |
Authors: | Sergio Oller Moreno [aut, cph, cre] |
Maintainer: | Sergio Oller Moreno <[email protected]> |
License: | BSD_3_clause + file LICENSE |
Version: | 0.10.1.9000 |
Built: | 2024-11-03 03:51:05 UTC |
Source: | https://github.com/zeehio/condformat |
This method is exported so package users can generate their own rules
cf_field_to_css(cf_field, xview, css_fields, unlocked)
cf_field_to_css(cf_field, xview, css_fields, unlocked)
cf_field |
A cf_field object. This is like a rule, but with the computed colour values. It usually maps one-to-one to a CSS field. |
xview |
A data frame with the columns to be printed and rows filtered |
css_fields |
A list of matrices. The names of the list are CSS attributes and each matrix is of the size of xview and contains the respective CSS values. |
unlocked |
A logical matrix of cells unlocked (that can still be modified by further rules). |
A list with two elements: css_fields and unlocked (with updated values)
This method is exported so package users can generate their own rules
cf_field_to_gtable( cf_field, xview, gridobj, unlocked, has_rownames, has_colnames )
cf_field_to_gtable( cf_field, xview, gridobj, unlocked, has_rownames, has_colnames )
cf_field |
A cf_field object. This is like a rule, but with the computed colour values. It usually maps one-to-one to a CSS field. |
xview |
A data frame with the columns to be printed and rows filtered |
gridobj |
The tableGrob object |
unlocked |
A logical matrix of cells unlocked (that can still be modified by further rules). |
has_rownames |
Whether or not the gridobj has a first column with row names |
has_colnames |
Whether or not the gridobj has a first row with column names |
A list with two elements: gridobj and unlocked (with updated values)
How to export cf values to latex
cf_field_to_latex(cf_field, xview, unlocked)
cf_field_to_latex(cf_field, xview, unlocked)
cf_field |
A cf_field object. This is like a rule, but with the computed colour values. It usually maps one-to-one to a CSS field. |
xview |
A data frame with the columns to be printed and rows filtered |
unlocked |
A logical matrix of cells unlocked (that can still be modified by further rules). |
A list with two character matrices named before
and after
. Both
of these matrices must be of the same size as xview
.
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.
condformat(x)
condformat(x)
x |
A matrix or data.frame |
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 the 'RStudio Viewer' or an 'HTML browser', as available.
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)
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)
Output and render functions for using condformat within Shiny applications and interactive Rmd documents.
condformatOutput(outputId, ...) renderCondformat(expr, env = parent.frame(), quoted = FALSE) condformat_example(display.mode = "normal")
condformatOutput(outputId, ...) renderCondformat(expr, env = parent.frame(), quoted = FALSE) condformat_example(display.mode = "normal")
outputId |
output variable to read from |
... |
arguments passed to htmlOutput |
expr |
An expression that generates a condformat object |
env |
The environment in which to evaluate |
quoted |
Is |
display.mode |
The mode in which to display the application. If set to
the value |
Writes the table to an Excel workbook
condformat2excel( x, filename, sheet_name = "Sheet1", overwrite_wb = FALSE, overwrite_sheet = TRUE )
condformat2excel( x, filename, sheet_name = "Sheet1", overwrite_wb = FALSE, overwrite_sheet = TRUE )
x |
A condformat_tbl object |
filename |
The xlsx file name. |
sheet_name |
The name of the sheet where the table will be written |
overwrite_wb |
logical to overwrite the whole workbook file |
overwrite_sheet |
logical to overwrite the sheet |
Converts the table to a grid object
condformat2grob(x, draw = TRUE)
condformat2grob(x, draw = TRUE)
x |
A condformat_tbl object |
draw |
A logical. If |
the grid object
library(condformat) data.frame(Student = c("Alice", "Bob", "Charlie"), Evaluation = c("Great", "Well done", "Good job!")) %>% condformat() %>% condformat2grob()
library(condformat) data.frame(Student = c("Alice", "Bob", "Charlie"), Evaluation = c("Great", "Well done", "Good job!")) %>% condformat() %>% condformat2grob()
Converts the table to a htmlTable object
condformat2html(x)
condformat2html(x)
x |
A condformat_tbl object |
the htmlTable object
data(iris) cf <- condformat2html(condformat(iris[1:5,])) ## Not run: print(cf) ## End(Not run)
data(iris) cf <- condformat2html(condformat(iris[1:5,])) ## Not run: print(cf) ## End(Not run)
Converts the table to LaTeX code
condformat2latex(x)
condformat2latex(x)
x |
A condformat_tbl object |
A character vector of the table source code
Converts the table to a htmlTableWidget
condformat2widget(x, ...)
condformat2widget(x, ...)
x |
A condformat_tbl object |
... |
Deprecated: Arguments passed to htmlTable::htmlTableWidget |
the htmlTable widget
## Not run: data(iris) cf <- condformat2widget(condformat(iris[1:5,])) \dontrun{ print(cf) } ## End(Not run)
## Not run: data(iris) cf <- condformat2widget(condformat(iris[1:5,])) \dontrun{ print(cf) } ## End(Not run)
Print method for knitr, exporting to HTML or LaTeX as needed
## S3 method for class 'condformat_tbl' knit_print(x, ...)
## S3 method for class 'condformat_tbl' knit_print(x, ...)
x |
Object to print |
... |
On a LaTeX output these are unused. On an HTML output can have |
Prints the data frame in an HTML page and shows it.
## S3 method for class 'condformat_tbl' print(x, ..., paginate = TRUE)
## S3 method for class 'condformat_tbl' print(x, ..., paginate = TRUE)
x |
A |
... |
Arguments passed on to
|
paginate |
A logical value. If |
the value returned by htmlTable::htmlTable()
data(iris) ## Not run: print(condformat(iris[1:5,])) ## End(Not run)
data(iris) ## Not run: print(condformat(iris[1:5,])) ## End(Not run)
Apply a CSS style property as a conditional formatting rule
rule_css(x, columns, expression, css_field, na.value = "", lockcells = FALSE)
rule_css(x, columns, expression, css_field, na.value = "", lockcells = FALSE)
x |
A condformat object, typically created with |
columns |
A character vector with column names to be coloured. Optionally
|
expression |
This expression should evaluate to an array of the values |
css_field |
CSS style property name (e.g. |
na.value |
CSS property value to be used in missing values (e.g. |
lockcells |
logical value determining if no further rules should be applied to the affected cells. |
Other rule:
rule_fill_bar()
,
rule_fill_discrete()
,
rule_fill_gradient2()
,
rule_fill_gradient()
,
rule_text_bold()
,
rule_text_color()
data(iris) cf <- condformat(iris[c(1:5, 51:55, 101:105),]) %>% rule_css(Species, expression = ifelse(Species == "setosa", "red", "darkgreen"), css_field = "color") ## Not run: print(cf) ## End(Not run)
data(iris) cf <- condformat(iris[c(1:5, 51:55, 101:105),]) %>% rule_css(Species, expression = ifelse(Species == "setosa", "red", "darkgreen"), css_field = "color") ## Not run: print(cf) ## End(Not run)
Fills the background of a column cell using a bar proportional to the value of the cell
rule_fill_bar( x, columns, expression, low = "darkgreen", high = "white", background = "white", na.value = "gray", limits = NA, lockcells = FALSE )
rule_fill_bar( x, columns, expression, low = "darkgreen", high = "white", background = "white", na.value = "gray", limits = NA, lockcells = FALSE )
x |
A condformat object, typically created with |
columns |
A character vector with column names to be coloured. Optionally
|
expression |
an expression to be evaluated with the data. It should evaluate to a numeric vector, that will be used to determine the colour gradient level. |
low |
Colour for the beginning of the bar |
high |
Colour for the end of the bar |
background |
Background colour for the cell |
na.value |
Colour for missing values |
limits |
range of limits that the gradient should cover |
lockcells |
logical value determining if no further rules should be applied to the affected cells. |
The condformat_tbl object, with the added formatting information
Other rule:
rule_css()
,
rule_fill_discrete()
,
rule_fill_gradient2()
,
rule_fill_gradient()
,
rule_text_bold()
,
rule_text_color()
data(iris) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_bar("Sepal.Length") ## Not run: print(cf) ## End(Not run)
data(iris) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_bar("Sepal.Length") ## Not run: print(cf) ## End(Not run)
Fills a column or columns of a data frame using a discrete colour palette, based on an expression.
rule_fill_discrete( x, columns, expression, colours = NA, na.value = "#FFFFFF", h = c(0, 360) + 15, c = 100, l = 65, h.start = 0, direction = 1, lockcells = FALSE )
rule_fill_discrete( x, columns, expression, colours = NA, na.value = "#FFFFFF", h = c(0, 360) + 15, c = 100, l = 65, h.start = 0, direction = 1, lockcells = FALSE )
x |
A condformat object, typically created with |
columns |
A character vector with column names to be coloured. Optionally
|
expression |
an expression to be evaluated with the data. It should evaluate to a logical or an integer vector, that will be used to determine which cells are to be coloured. |
colours |
a character vector with colours as values and the expression possible results as names. |
na.value |
a character string with the CSS color to be used in missing values |
h |
range of hues to use, in [0, 360] |
c |
chroma (intensity of colour), maximum value varies depending on combination of hue and luminance. |
l |
luminance (lightness), in [0, 100] |
h.start |
hue to start at |
direction |
direction to travel around the colour wheel, 1 = clockwise, -1 = counter-clockwise |
lockcells |
logical value determining if no further rules should be applied to the affected cells. |
The condformat_tbl object, with the added formatting information
Other rule:
rule_css()
,
rule_fill_bar()
,
rule_fill_gradient2()
,
rule_fill_gradient()
,
rule_text_bold()
,
rule_text_color()
data(iris) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_discrete("Species", colours = c("setosa" = "red", "versicolor" = "blue", "virginica" = "green")) %>% rule_fill_discrete("Sepal.Length", expression = Sepal.Length > 4.6, colours=c("TRUE"="red")) ## Not run: print(cf) ## End(Not run) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_discrete(c(starts_with("Sepal"), starts_with("Petal")), expression = Sepal.Length > 4.6, colours=c("TRUE"="red")) ## Not run: print(cf) ## End(Not run)
data(iris) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_discrete("Species", colours = c("setosa" = "red", "versicolor" = "blue", "virginica" = "green")) %>% rule_fill_discrete("Sepal.Length", expression = Sepal.Length > 4.6, colours=c("TRUE"="red")) ## Not run: print(cf) ## End(Not run) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_discrete(c(starts_with("Sepal"), starts_with("Petal")), expression = Sepal.Length > 4.6, colours=c("TRUE"="red")) ## Not run: print(cf) ## End(Not run)
Fills the background color of a column using a gradient based on the values given by an expression
rule_fill_gradient( x, columns, expression, low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "#7F7F7F", limits = NA, lockcells = FALSE )
rule_fill_gradient( x, columns, expression, low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "#7F7F7F", limits = NA, lockcells = FALSE )
x |
A condformat object, typically created with |
columns |
A character vector with column names to be coloured. Optionally
|
expression |
an expression to be evaluated with the data. It should evaluate to a numeric vector, that will be used to determine the colour gradient level. |
low |
colour for low end of gradient. |
high |
colour for high end of gradient. |
space |
colour space in which to calculate gradient. Must be "Lab" - other values are deprecated. |
na.value |
fill color for missing values |
limits |
range of limits that the gradient should cover |
lockcells |
logical value determining if no further rules should be applied to the affected cells. |
The condformat_tbl object, with the added formatting information
Other rule:
rule_css()
,
rule_fill_bar()
,
rule_fill_discrete()
,
rule_fill_gradient2()
,
rule_text_bold()
,
rule_text_color()
data(iris) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_gradient(Sepal.Length) %>% rule_fill_gradient(Species, expression=Sepal.Length - Sepal.Width) ## Not run: print(cf) ## End(Not run) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_gradient("Petal.Length") %>% rule_fill_gradient(starts_with("Sepal"), expression=Sepal.Length - Sepal.Width) ## Not run: print(cf) ## End(Not run)
data(iris) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_gradient(Sepal.Length) %>% rule_fill_gradient(Species, expression=Sepal.Length - Sepal.Width) ## Not run: print(cf) ## End(Not run) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_gradient("Petal.Length") %>% rule_fill_gradient(starts_with("Sepal"), expression=Sepal.Length - Sepal.Width) ## Not run: print(cf) ## End(Not run)
Fills the background color of a column using a gradient based on the values given by an expression
rule_fill_gradient2( x, columns, expression, low = scales::muted("red"), mid = "white", high = scales::muted("blue"), midpoint = NA, space = "Lab", na.value = "#7F7F7F", limits = NA, lockcells = FALSE )
rule_fill_gradient2( x, columns, expression, low = scales::muted("red"), mid = "white", high = scales::muted("blue"), midpoint = NA, space = "Lab", na.value = "#7F7F7F", limits = NA, lockcells = FALSE )
x |
A condformat object, typically created with |
columns |
A character vector with column names to be colored. Optionally
|
expression |
an expression to be evaluated with the data. It should evaluate to a logical or an integer vector, that will be used to determine which cells are to be colored. |
low |
colour for low end of gradient. |
mid |
colour for mid point |
high |
colour for high end of gradient. |
midpoint |
the value used for the middle color (the median by default) |
space |
colour space in which to calculate gradient. Must be "Lab" - other values are deprecated. |
na.value |
fill color for missing values |
limits |
range of limits that the gradient should cover |
lockcells |
logical value determining if no further rules should be applied to the affected cells. |
The condformat_tbl object, with the added formatting information
Other rule:
rule_css()
,
rule_fill_bar()
,
rule_fill_discrete()
,
rule_fill_gradient()
,
rule_text_bold()
,
rule_text_color()
data(iris) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_gradient2(Sepal.Length) %>% rule_fill_gradient2(Species, expression=Sepal.Length - Sepal.Width) ## Not run: print(cf) ## End(Not run) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_gradient2("Petal.Length") %>% rule_fill_gradient2(starts_with("Sepal"), expression=Sepal.Length - Sepal.Width) ## Not run: print(cf) ## End(Not run)
data(iris) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_gradient2(Sepal.Length) %>% rule_fill_gradient2(Species, expression=Sepal.Length - Sepal.Width) ## Not run: print(cf) ## End(Not run) cf <- condformat(iris[c(1:5, 70:75, 120:125), ]) %>% rule_fill_gradient2("Petal.Length") %>% rule_fill_gradient2(starts_with("Sepal"), expression=Sepal.Length - Sepal.Width) ## Not run: print(cf) ## End(Not run)
Use bold text if a condition is met
rule_text_bold(x, columns, expression, na.bold = FALSE, lockcells = FALSE)
rule_text_bold(x, columns, expression, na.bold = FALSE, lockcells = FALSE)
x |
A condformat object, typically created with |
columns |
A character vector with column names to be coloured. Optionally
|
expression |
Condition that evaluates to |
na.bold |
If |
lockcells |
logical value determining if no further rules should be applied to the affected cells. |
Other rule:
rule_css()
,
rule_fill_bar()
,
rule_fill_discrete()
,
rule_fill_gradient2()
,
rule_fill_gradient()
,
rule_text_color()
data(iris) cf <- condformat(iris[c(1:5, 51:55, 101:105),]) %>% rule_text_bold(Species, expression = Species == "setosa") ## Not run: print(cf) ## End(Not run)
data(iris) cf <- condformat(iris[c(1:5, 51:55, 101:105),]) %>% rule_text_bold(Species, expression = Species == "setosa") ## Not run: print(cf) ## End(Not run)
Give a color to the text according to some expression
rule_text_color(x, columns, expression, na.color = "", lockcells = FALSE)
rule_text_color(x, columns, expression, na.color = "", lockcells = FALSE)
x |
A condformat object, typically created with |
columns |
A character vector with column names to be coloured. Optionally
|
expression |
Condition that evaluates to color names for the rows where text should be colored |
na.color |
Color for missing values |
lockcells |
logical value determining if no further rules should be applied to the affected cells. |
Other rule:
rule_css()
,
rule_fill_bar()
,
rule_fill_discrete()
,
rule_fill_gradient2()
,
rule_fill_gradient()
,
rule_text_bold()
data(iris) cf <- condformat(iris[c(1:5, 51:55, 101:105),]) %>% rule_text_color(Species, expression = ifelse(Species == "setosa", "blue", "")) ## Not run: print(cf) ## End(Not run)
data(iris) cf <- condformat(iris[c(1:5, 51:55, 101:105),]) %>% rule_text_color(Species, expression = ifelse(Species == "setosa", "blue", "")) ## Not run: print(cf) ## End(Not run)
Keeps the variables you mention in the printed table.
Compared to dplyr::select()
, show_columns does not remove the
columns from the data frame, so formatting rules can still depend
on them.
show_columns(x, columns, col_names)
show_columns(x, columns, col_names)
x |
A condformat object, typically created with |
columns |
A character vector with column names to be to show. It can also be an expression
can be used that will be parsed according to |
col_names |
Character vector with the column names for the selected columns |
The condformat object with the rule added
data(iris) x <- head(iris) # Include some columns: cf <- condformat(x) %>% show_columns(c(Sepal.Length, Sepal.Width, Species)) ## Not run: print(cf) ## End(Not run) cf <- condformat(x) %>% show_columns(c("Sepal.Length", "Sepal.Width", "Species")) ## Not run: print(cf) ## End(Not run) # Rename columns: cf <- condformat(x) %>% show_columns(c(Sepal.Length, Species), col_names = c("Length", "Spec.")) ## Not run: print(cf) ## End(Not run) # Exclude some columns: cf <- condformat(x) %>% show_columns(c(-Petal.Length, -Petal.Width)) ## Not run: print(cf) ## End(Not run) cf <- condformat(x) %>% show_columns(c(starts_with("Petal"), Species)) ## Not run: print(cf) ## End(Not run) petal_width <- "Petal.Width" cf <- condformat(x) %>% show_columns(!! petal_width) ## Not run: print(cf) ## End(Not run)
data(iris) x <- head(iris) # Include some columns: cf <- condformat(x) %>% show_columns(c(Sepal.Length, Sepal.Width, Species)) ## Not run: print(cf) ## End(Not run) cf <- condformat(x) %>% show_columns(c("Sepal.Length", "Sepal.Width", "Species")) ## Not run: print(cf) ## End(Not run) # Rename columns: cf <- condformat(x) %>% show_columns(c(Sepal.Length, Species), col_names = c("Length", "Spec.")) ## Not run: print(cf) ## End(Not run) # Exclude some columns: cf <- condformat(x) %>% show_columns(c(-Petal.Length, -Petal.Width)) ## Not run: print(cf) ## End(Not run) cf <- condformat(x) %>% show_columns(c(starts_with("Petal"), Species)) ## Not run: print(cf) ## End(Not run) petal_width <- "Petal.Width" cf <- condformat(x) %>% show_columns(!! petal_width) ## Not run: print(cf) ## End(Not run)
Keeps the rows you mention in the printed table.
Compared to dplyr::filter()
, show_rows does not remove the
rows from the actual data frame, they are removed only for printing.
show_rows(x, ...)
show_rows(x, ...)
x |
condformat_tbl object |
... |
Expressions used for filtering |
A condformat_show_rows object, usually to be added to a condformat_tbl object as shown in the examples
library(condformat) data(iris) x <- head(iris) cf <- condformat(x) %>% show_rows(Sepal.Length > 4.5, Species == "setosa") ## Not run: print(cf) ## End(Not run) # Use it programatically expr_as_text <- 'Sepal.Length > 4.5' expr <- rlang::parse_expr(expr_as_text) cf <- condformat(x) %>% show_rows(!! expr) ## Not run: print(cf) ## End(Not run) # With multiple arguments: expr_as_text <- c('Sepal.Length > 4.5', 'Species == "setosa"') exprs <- lapply(expr_as_text, rlang::parse_expr) cf <- condformat(x) %>% show_rows(!!! exprs) ## Not run: print(cf) ## End(Not run)
library(condformat) data(iris) x <- head(iris) cf <- condformat(x) %>% show_rows(Sepal.Length > 4.5, Species == "setosa") ## Not run: print(cf) ## End(Not run) # Use it programatically expr_as_text <- 'Sepal.Length > 4.5' expr <- rlang::parse_expr(expr_as_text) cf <- condformat(x) %>% show_rows(!! expr) ## Not run: print(cf) ## End(Not run) # With multiple arguments: expr_as_text <- c('Sepal.Length > 4.5', 'Species == "setosa"') exprs <- lapply(expr_as_text, rlang::parse_expr) cf <- condformat(x) %>% show_rows(!!! exprs) ## Not run: print(cf) ## End(Not run)
This is only used on grob output.
theme_grob(x, ...)
theme_grob(x, ...)
x |
The condformat object |
... |
Arguments to be passed to gridExtra::tableGrob (see examples) |
data(iris) cf <- condformat(head(iris)) %>% theme_grob( rows = NULL, theme = gridExtra::ttheme_default(base_size = 10, base_colour = "red") ) condformat2grob(cf)
data(iris) cf <- condformat(head(iris)) %>% theme_grob( rows = NULL, theme = gridExtra::ttheme_default(base_size = 10, base_colour = "red") ) condformat2grob(cf)
Customizes appearance of condformat object
theme_htmlTable(x, ...)
theme_htmlTable(x, ...)
x |
The condformat object |
... |
Arguments to be passed to htmlTable |
data(iris) cf <- condformat(head(iris)) %>% theme_htmlTable(caption="Table 1: My iris table", rnames=FALSE) ## Not run: print(cf) ## End(Not run)
data(iris) cf <- condformat(head(iris)) %>% theme_htmlTable(caption="Table 1: My iris table", rnames=FALSE) ## Not run: print(cf) ## End(Not run)
Customizes appearance of condformat object
theme_htmlWidget(x, ...)
theme_htmlWidget(x, ...)
x |
The condformat object |
... |
Arguments to be passed to htmlTable::htmlTableWidget (see examples) |
data(iris) cf <- condformat(head(iris)) %>% theme_htmlWidget(number_of_entries = c(10, 25, 100), width = NULL, height = NULL, elementId = NULL) ## Not run: print(cf) ## End(Not run)
data(iris) cf <- condformat(head(iris)) %>% theme_htmlWidget(number_of_entries = c(10, 25, 100), width = NULL, height = NULL, elementId = NULL) ## Not run: print(cf) ## End(Not run)
This is only used on LaTeX output.
theme_kable(x, ...)
theme_kable(x, ...)
x |
The condformat object |
... |
Arguments to be passed to knitr::kable (see examples) |
data(iris) cf <- condformat(head(iris)) %>% theme_kable(booktabs = TRUE, caption = "My Caption") ## Not run: print(cf) ## End(Not run)
data(iris) cf <- condformat(head(iris)) %>% theme_kable(booktabs = TRUE, caption = "My Caption") ## Not run: print(cf) ## End(Not run)