condformat2grob: Converts the table to a grid object

View source: R/render_gtable.R

condformat2grobR Documentation

Converts the table to a grid object

Description

Requires the gridExtra package (install.packages("gridExtra")).

Usage

condformat2grob(x, draw = TRUE)

Arguments

x

A condformat_tbl object

draw

A logical. If TRUE (default), the table is immediately drawn using grid::draw() and the grob is returned. If FALSE, the grob is returned without drawing. Set draw=FALSE when using the grob in composite images with gridExtra::grid.arrange() or ggpubr::ggarrange().

Value

the grid object

Examples

library(condformat)
if (requireNamespace("gridExtra", quietly = TRUE)) {
  data.frame(Student = c("Alice", "Bob", "Charlie"),
             Evaluation = c("Great", "Well done", "Good job!")) |>
   condformat() |>
   condformat2grob()
}

condformat documentation built on July 10, 2026, 1:07 a.m.