### Create Table with Notes and Export to LaTeX Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/man/tt.html This example demonstrates creating a TinyTable with notes and then printing it in LaTeX format. The `notes` argument takes a list where keys are symbols and values are lists of cell positions and text. Ensure the `tabularray` package is installed for LaTeX output. ```r fn <- list(i = 0:1, j = 2, text = "Hello World!") tab <- tt(x, notes = list("*" = fn)) print(tab, "latex") ``` -------------------------------- ### Basic Plotting Example Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/plot.html Demonstrates how to create a simple plot from a data frame. Ensure the necessary libraries are installed and data is loaded. ```R library(tinytable) data("iris") tt <- as.tinytable(iris) plot(tt, x = "Sepal.Length", y = "Sepal.Width") ``` -------------------------------- ### Snapshot Testing Setup Source: https://github.com/vincentarelbundock/tinytable/blob/main/CLAUDE.md Setup for snapshot testing in tinytable, including loading helper functions and the tinysnapshot package. ```R source("helpers.R") using("tinysnapshot") ``` -------------------------------- ### Install Package and Run Full Test Suite Source: https://github.com/vincentarelbundock/tinytable/blob/main/CLAUDE.md Install the tinytable package and run its entire test suite using the tinytest framework. ```Makefile make test ``` -------------------------------- ### Install tinytable from GitHub Source: https://github.com/vincentarelbundock/tinytable/blob/main/README.md Install the development version of tinytable directly from GitHub using the remotes package. ```r remotes::install_github("vincentarelbundock/tinytable") ``` -------------------------------- ### Basic Plotting Example Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/plot.html This snippet shows a fundamental example of creating a plot. Ensure the necessary libraries are loaded before execution. ```R library(tinytable) library(dplyr) data("iris") tiny( iris %>% group_by(Species) %>% summarise(Sepal.Length = mean(Sepal.Length), Sepal.Width = mean(Sepal.Width)) ) ``` -------------------------------- ### Basic Plotting Example Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/plot.html This snippet shows a fundamental example of creating a plot. Ensure you have the necessary libraries imported. ```R library(tinytable) df <- data.frame(x = 1:10, y = (1:10)^2) tinyplot(x, y, data = df) ``` -------------------------------- ### Luxon Date Format Examples Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/interactive.html Provides examples of common Luxon date format tokens and their corresponding output for various international date formats. Useful for understanding date formatting options in Tabulator. ```javascript document.addEventListener("DOMContentLoaded", function() { const table_tinytable_bo1b7qqirscfnrdqh68t = TinyTable.createTabulator("#tinytable_bo1b7qqirscfnrdqh68t", { data: [{"Luxon_Format":"M/d/yyyy","Output_Example":"1/15/2020","Description":"US short format","_tinytable_row_index":1},{"Luxon_Format":"MM/dd/yyyy","Output_Example":"01/15/2020","Description":"US padded format","_tinytable_row_index":2},{"Luxon_Format":"d/M/yyyy","Output_Example":"15/1/2020","Description":"European short format","_tinytable_row_index":3},{"Luxon_Format":"dd/MM/yyyy","Output_Example":"15/01/2020","Description":"European padded format","_tinytable_row_index":4},{"Luxon_Format":"yyyy-MM-dd","Output_Example":"2020-01-15","Description":"ISO format","_tinytable_row_index":5},{"Luxon_Format":"MMM d, yyyy","Output_Example":"Jan 15, 2020","Description":"Long month name","_tinytable_row_index":6}], columns: [{"title":"Luxon Format","field":"Luxon_Format"},{"title":"Output Example","field":"Output_Example"},{"title":"Description","field":"Description"}], layout: 'fitDataTable' , }); }); ``` -------------------------------- ### Basic tinytable setup Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/customization.html Sets global options for tinytable and creates a small data frame for demonstration. ```r library(tinytable) options(tinytable_tt_digits = 3) x <- mtcars[1:4, 1:5] ``` -------------------------------- ### Install tinytable Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/tinytable.html Install the latest version of the tinytable package from R-Universe or CRAN. ```r install.packages("tinytable", repos = c("https://vincentarelbundock.r-universe.dev", "https://cran.r-project.org") ) ``` -------------------------------- ### Install tinytable from R-Universe Source: https://github.com/vincentarelbundock/tinytable/blob/main/README.md Install the latest development version of tinytable from R-Universe. Remember to restart R after installation. ```r install.packages('tinytable', repos = c('https://vincentarelbundock.r-universe.dev', 'https://cloud.r-project.org')) ``` -------------------------------- ### Style Specific Cells in TinyTable (Second Example) Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/man/tt.html This example also demonstrates styling specific cells in TinyTable, similar to the first example, but with different cell positions and CSS IDs. It also requires the TinyTable library and an event listener for window load. ```javascript const tableFns_oc82kazopf0frjszfe1h = TinyTable.createTableFunctions("tinytable_oc82kazopf0frjszfe1h"); window.addEventListener('load', function () { var cellsToStyle = [ { positions: [ { i: '5', j: 1 }, { i: '5', j: 2 }, { i: '5', j: 3 } ], css_id: 'tinytable_css_098l2lvrd4fpi9jswxd8' }, { positions: [ { i: '0', j: 1 }, { i: '0', j: 2 }, { i: '0', j: 3 } ], css_id: 'tinytable_css_vtwtkx7ft6613brjz7j6' } ]; cellsToStyle.forEach(function (group) { group.positions.forEach(function (cell) { tableFns_oc82kazopf0frjszfe1h.styleCell(cell.i, cell.j, group.css_id); }); }); }); ``` ```css #tinytable_oc82kazopf0frjszfe1h td.tinytable_css_098l2lvrd4fpi9jswxd8, #tinytable_oc82kazopf0frjszfe1h th.tinytable_css_098l2lvrd4fpi9jswxd8 { position: relative; --border-bottom: 1; --border-left: 0; --border-right: 0; --border-top: 0; --line-color-bottom: var(--tt-line-color); --line-color-left: var(--tt-line-color); --line-color-right: var(--tt-line-color); --line-color-top: var(--tt-line-color); --line-width-bottom: 0.08em; --line-width-left: 0.1em; --line-width-right: 0.1em; --line-width-top: 0.1em; --trim-bottom-left: 0%; --trim-bottom-right: 0%; --trim-left-bottom: 0%; --trim-left-top: 0%; --trim-right-bottom: 0%; --trim-right-top: 0%; --trim-top-left: 0%; --trim-top-right: 0%; } #tinytable_oc82kazopf0frjszfe1h td.tinytable_css_vtwtkx7ft6613brjz7j6, #tinytable_oc82kazopf0frjszfe1h th.tinytable_css_vtwtkx7ft6613brjz7j6 { position: relative; --border-bottom: 1; --border-left: 0; --border-right: 0; --border-top: 1; --line-color-bottom: var(--tt-line-color); --line-color-left: var(--tt-line-color); --line-color-right: var(--tt-line-color); --line-color-top: var(--tt-line-color); --line-width-bottom: 0.05em; --line-width-left: 0.1em; --line-width-right: 0.1em; --line-width-top: 0.08em; --trim-bottom-left: 0%; --trim-bottom-right: 0%; --trim-left-bottom: 0%; --trim-left-top: 0%; --trim-right-bottom: 0%; --trim-right-top: 0%; --trim-top-left: 0%; --trim-top-right: 0%; } ``` -------------------------------- ### Install Package without Dependencies Source: https://github.com/vincentarelbundock/tinytable/blob/main/CLAUDE.md Install the tinytable package without installing its dependencies. ```Makefile make install ``` -------------------------------- ### Histogram Example Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/plot.html Demonstrates how to create a histogram to visualize the distribution of a single numerical variable. ```R library(tinytable) df <- data.frame(values = rnorm(100)) tinyplot(values, data = df, type = "h") ``` -------------------------------- ### Basic Plotting Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/plot.html This example shows how to generate a basic plot from a data frame. Ensure the 'tinytable' package is loaded. ```R library(tinytable) data("iris") tinyplot(Sepal.Length ~ Sepal.Width, data = iris, pch = 19, col = "blue") ``` -------------------------------- ### Box Plot Example Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/plot.html Shows how to generate a box plot, which is effective for displaying the distribution and summary statistics of numerical data. ```R library(tinytable) df <- data.frame(group = rep(c("A", "B"), each = 50), value = c(rnorm(50), rnorm(50, mean = 1))) tinyplot(group, value, data = df, type = "o") ``` -------------------------------- ### Install Development Version of tinytable Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/interactive.html To get the latest features and bug fixes, install the development version of tinytable from GitHub. Remember to restart R after installation. ```r library(remotes) install_github("vincentarelbundock/tinytable") ``` -------------------------------- ### Define Custom CSS for TinyTable Cells (Second Example) Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/theme.html A second set of CSS rules for custom cell styling in TinyTables. This example provides alternative border and line configurations for cells, complementing the first CSS example. ```css #tinytable_28lgs6vo77v6xlho889e td.tinytable_css_attgof37v2nn1o6wjegt, #tinytable_28lgs6vo77v6xlho889e th.tinytable_css_attgof37v2nn1o6wjegt { position: relative; --border-bottom: 1; --border-left: 0; --border-right: 0; --border-top: 0; --line-color-bottom: var(--tt-line-color); --line-color-left: var(--tt-line-color); --line-color-right: var(--tt-line-color); --line-color-top: var(--tt-line-color); --line-width-bottom: 0.08em; --line-width-left: 0.1em; --line-width-right: 0.1em; --line-width-top: 0.1em; --trim-bottom-left: 0%; --trim-bottom-right: 0%; --trim-left-bottom: 0%; --trim-left-top: 0%; --trim-right-bottom: 0%; --trim-right-top: 0%; --trim-top-left: 0%; --trim-top-right: 0%; } #tinytable_28lgs6vo77v6xlho889e td.tinytable_css_u16z0ii7cx4f4ub0aqfc, #tinytable_28lgs6vo77v6xlho889e th.tinytable_css_u16z0ii7cx4f4ub0aqfc { position: relative; --border-bottom: 1; --border-left: 0; --border-right: 0; --border-top: 1; --line-color-bottom: var(--tt-line-color); --line-color-left: var(--tt-line-color); --line-color-right: var(--tt-line-color); --line-color-top: var(--tt-line-color); --line-width-bottom: 0.05em; --line-width-left: 0.1em; --line-width-right: 0.1em; --line-width-top: 0.08em; --trim-bottom-left: 0%; --trim-bottom-right: 0%; --trim-left-bottom: 0%; --trim-left-top: 0%; --trim-right-bottom: 0%; --trim-right-top: 0%; --trim-top-left: 0%; --trim-top-right: 0%; } ``` -------------------------------- ### Create an Interactive Table with Custom Formatting Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/interactive.html Demonstrates how to initialize a tinytable with custom column definitions, including HTML formatting and a custom sorter. This is useful for displaying rich content within table cells and enabling advanced sorting logic. ```R tinytable( data = data.frame(City = "London", Fun = "", rank_Fun = 0.1, check.names = FALSE ), columns = list( list(title="City", field="City", vertAlign="middle"), list(title="Fun", field="Fun", formatter="html", sorter=tinytable_rank_sorter, sorterParams=list(rankField="rank_Fun")), layout = 'fitDataTable' ) ); #tinytable_v0to2lgjydnt7j9lg8yk .tabulator-cell[tabulator-field='City'] { vertical-align: middle } #tinytable_v0to2lgjydnt7j9lg8yk .tabulator-cell[tabulator-field='Fun'] { vertical-align: middle } ``` -------------------------------- ### Style Specific Cells in a TinyTable (Second Example) Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/theme.html Another example of applying custom CSS classes to specific cells in a TinyTable, demonstrating the flexibility of the `styleCell` function. This code is similar to the first styling example but uses different table and CSS IDs. ```javascript const tableFns_28lgs6vo77v6xlho889e = TinyTable.createTableFunctions("tinytable_28lgs6vo77v6xlho889e"); window.addEventListener('load', function () { var cellsToStyle = [ { positions: [ { i: '3', j: 1 }, { i: '3', j: 2 }, { i: '3', j: 3 }, { i: '3', j: 4 }, { i: '3', j: 5 } ], css_id: 'tinytable_css_attgof37v2nn1o6wjegt', }, { positions: [ { i: '0', j: 1 }, { i: '0', j: 2 }, { i: '0', j: 3 }, { i: '0', j: 4 }, { i: '0', j: 5 } ], css_id: 'tinytable_css_u16z0ii7cx4f4ub0aqfc', }, ]; cellsToStyle.forEach(function (group) { group.positions.forEach(function (cell) { tableFns_28lgs6vo77v6xlho889e.styleCell(cell.i, cell.j, group.css_id); }); }); }); ``` -------------------------------- ### Create and Print an Interactive HTML Table Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/interactive.html Use `theme_html(engine = "tabulator")` to create an interactive table. The `print("html")` method displays it. ```r library(tinytable) dat <- head(iris) tt(dat) |> theme_html(engine = "tabulator") |> print("html") ``` -------------------------------- ### Render Vignettes and Rebuild Website Source: https://github.com/vincentarelbundock/tinytable/blob/main/CLAUDE.md Render package vignettes and rebuild the project website using altdoc. ```Makefile make website ``` -------------------------------- ### CSS for Cell Styling (Example 2) Source: https://github.com/vincentarelbundock/tinytable/blob/main/inst/tinytest/_tinysnapshot/html-issue355b.html Defines CSS rules for another cell style, similar to the previous example but with different trimming values. This targets cells with the class `tinytable_css_j8n03v5x2ryft3zipqti`. ```css #tinytable_9w4ba05nrcthrp8qaqnm td.tinytable_css_j8n03v5x2ryft3zipqti, #tinytable_9w4ba05nrcthrp8qaqnm th.tinytable_css_j8n03v5x2ryft3zipqti { position: relative; --border-bottom: 1; --border-left: 0; --border-right: 0; --border-top: 1; --line-color-bottom: black; --line-color-left: var(--tt-line-color); --line-color-right: var(--tt-line-color); --line-color-top: var(--tt-line-color); --line-width-bottom: 0.03em; --line-width-left: 0.1em; --line-width-right: 0.1em; --line-width-top: 0.08em; --trim-bottom-left: 0%; --trim-bottom-right: 3%; --trim-left-bottom: 0%; --trim-left-top: 0%; --trim-right-bottom: 0%; --trim-right-top: 0%; --trim-top-left: 0%; --trim-top-right: 0%; ; text-align: center } ``` -------------------------------- ### tabularray Table with Inner Settings Example Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/latex.html Demonstrates a LaTeX table using the tabularray package with complex inner settings for cell alignment, line colors, and background colors, including row and column spanning. ```LaTeX \begin{table} \centering \begin{tblr}[ ] %% { column{1-4}={halign=c}, hlines = {bg=white}, vlines = {bg=white}, cell{1,6}{odd} = {bg=teal7}, cell{1,6}{even} = {bg=green7}, cell{2,4}{1,4} = {bg=red7}, cell{3,5}{1,4} = {bg=purple7}, cell{2}{2} = {r=4,c=2}{bg=azure7}, } mpg & cyl & disp & hp \\ 21 & 6 & 160 & 110 \\ 21 & 6 & 160 & 110 \\ 22.8 & 4 & 108 & 93 \\ 21.4 & 6 & 258 & 110 \\ 18.7 & 8 & 360 & 175 \\ \end{tblr} \end{table} ``` -------------------------------- ### Define Custom Cell Styles (Second Example) Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/style.html Defines CSS rules for table cells identified by specific IDs. This is a variation of the CSS definition, corresponding to the second JavaScript styling example. ```css #tinytable_hp4aclu198av7kh2oxvr td.tinytable_css_9dqmu9fsfuc053rjgcbo, #tinytable_hp4aclu198av7kh2oxvr th.tinytable_css_9dqmu9fsfuc053rjgcbo { position: relative; --border-bottom: 1; --border-left: 0; --border-right: 0; --border-top: 0; --line-color-bottom: var(--tt-line-color); --line-color-left: var(--tt-line-color); --line-color-right: var(--tt-line-color); --line-color-top: var(--tt-line-color); --line-width-bottom: 0.08em; --line-width-left: 0.1em; --line-width-right: 0.1em; --line-width-top: 0.1em; --trim-bottom-left: 0%; --trim-bottom-right: 0%; --trim-left-bottom: 0%; --trim-left-top: 0%; --trim-right-bottom: 0%; --trim-right-top: 0%; --trim-top-left: 0%; --trim-top-right: 0%; } #tinytable_hp4aclu198av7kh2oxvr td.tinytable_css_4n1cy6vv3udgpm276zb4, #tinytable_hp4aclu198av7kh2oxvr th.tinytable_css_4n1cy6vv3udgpm276zb4 { position: relative; --border-bottom: 1; --border-left: 0; --border-right: 0; --border-top: 1; --line-color-bottom: var(--tt-line-color); --line-color-left: var(--tt-line-color); --line-color-right: var(--tt-line-color); --line-color-top: var(--tt-line-color); --line-width-bottom: 0.05em; --line-width-left: 0.1em; --line-width-right: 0.1em; --line-width-top: 0.08em; --trim-bottom-left: 0%; --trim-bottom-right: 0%; --trim-left-bottom: 0%; --trim-left-top: 0%; --trim-right-bottom: 0%; --trim-right-top: 0%; --trim-top-left: 0%; --trim-top-right: 0%; } ``` -------------------------------- ### Create and Style a Table with TinyTable Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/index.html Use this snippet to create a table with a caption and notes, then apply custom styling (background color, text color, bold) to specific rows and columns. It also demonstrates grouping columns with custom headers. ```R not <- "Nullam odio est, ullamcorper scelerisque lectus a, eleifend luctus nisl. Etiam ullamcorper, nibh vel interdum auctor, odio nulla mollis tortor, vel fringilla ante quam quis est." tt(x, caption = cap, notes = not, width = .5) |> style_tt( i = 1:3, j = 1:2, background = "teal", color = "white", bold = TRUE) |> group_tt( j = list("Halloumi" = 1:2, "Tofu" = 4:5)) ``` -------------------------------- ### CSS for Cell Styling (Example 1) Source: https://github.com/vincentarelbundock/tinytable/blob/main/inst/tinytest/_tinysnapshot/html-issue355b.html Defines CSS rules for a specific cell style, including border properties, line colors, widths, and trimming. This example targets cells with the class `tinytable_css_4yhk7o1mam4ger0t4y1l`. ```css #tinytable_9w4ba05nrcthrp8qaqnm td.tinytable_css_4yhk7o1mam4ger0t4y1l, #tinytable_9w4ba05nrcthrp8qaqnm th.tinytable_css_4yhk7o1mam4ger0t4y1l { position: relative; --border-bottom: 1; --border-left: 0; --border-right: 0; --border-top: 1; --line-color-bottom: black; --line-color-left: var(--tt-line-color); --line-color-right: var(--tt-line-color); --line-color-top: var(--tt-line-color); --line-width-bottom: 0.03em; --line-width-left: 0.1em; --line-width-right: 0.1em; --line-width-top: 0.08em; --trim-bottom-left: 3%; --trim-bottom-right: 0%; --trim-left-bottom: 0%; --trim-left-top: 0%; --trim-right-bottom: 0%; --trim-right-top: 0%; --trim-top-left: 0%; --trim-top-right: 0%; ; text-align: center } ``` -------------------------------- ### Applying Table Themes Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/man/tt.html Shows how to apply predefined themes (e.g., 'grid', 'striped') or custom functions to style the table. The `theme` argument accepts either a string name or a function. ```R theme = "grid" ``` ```R theme = my_custom_theme_function ``` -------------------------------- ### Style Table Cells with CSS (Variant) Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/man/format_tt.html This is an alternative example of dynamically styling table cells using JavaScript and CSS. It's similar to the previous example but uses different CSS IDs and cell positions. ```JavaScript const tableFns_9hv5sxlkurgnhcp3bhbf = TinyTable.createTableFunctions("tinytable_9hv5sxlkurgnhcp3bhbf"); window.addEventListener('load', function () { var cellsToStyle = [ { positions: [ { i: '1', j: 1 } ], css_id: 'tinytable_css_7varr0dhqlysfriaertf', }, { positions: [ { i: '0', j: 1 } ], css_id: 'tinytable_css_i1iktw7gx43h0ga2bnng', }, ]; cellsToStyle.forEach(function (group) { group.positions.forEach(function (cell) { tableFns_9hv5sxlkurgnhcp3bhbf.styleCell(cell.i, cell.j, group.css_id); }); }); }); ``` ```CSS #tinytable_9hv5sxlkurgnhcp3bhbf td.tinytable_css_7varr0dhqlysfriaertf, #tinytable_9hv5sxlkurgnhcp3bhbf th.tinytable_css_7varr0dhqlysfriaertf { position: relative; --border-bottom: 1; --border-left: 0; --border-right: 0; --border-top: 0; --line-color-bottom: var(--tt-line-color); --line-color-left: var(--tt-line-color); --line-color-right: var(--tt-line-color); --line-color-top: var(--tt-line-color); --line-width-bottom: 0.08em; --line-width-left: 0.1em; --line-width-right: 0.1em; --line-width-top: 0.1em; --trim-bottom-left: 0%; --trim-bottom-right: 0%; --trim-left-bottom: 0%; --trim-left-top: 0%; --trim-right-bottom: 0%; --trim-right-top: 0%; --trim-top-left: 0%; --trim-top-right: 0%; } #tinytable_9hv5sxlkurgnhcp3bhbf td.tinytable_css_i1iktw7gx43h0ga2bnng, #tinytable_9hv5sxlkurgnhcp3bhbf th.tinytable_css_i1iktw7gx43h0ga2bnng { position: relative; --border-bottom: 1; --border-left: 0; --border-right: 0; --border-top: 1; --line-color-bottom: var(--tt-line-color); --line-color-left: var(--tt-line-color); --line-color-right: var(--tt-line-color); --line-color-top: var(--tt-line-color); --line-width-bottom: 0.05em; --line-width-left: 0.1em; --line-width-right: 0.1em; --line-width-top: 0.08em; --trim-bottom-left: 0%; --trim-bottom-right: 0%; --trim-left-bottom: 0%; --trim-left-top: 0%; --trim-right-bottom: 0%; --trim-right-top: 0%; --trim-top-left: 0%; --trim-top-right: 0%; } ``` -------------------------------- ### Create a tinytable with specified width Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/tinytable.html Demonstrates how to create a tinytable and control its width using the `width` argument. The text within the table cells will wrap to fit the specified width. ```R lorem <- data.frame( Lorem = "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.", Ipsum = " Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos." ) tt(lorem, width = 3 / 4) ``` -------------------------------- ### Basic Plotting with tinytable Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/plot.html Demonstrates how to create a basic plot using tinytable. Ensure the tinytable package is loaded before use. ```R library(tinytable) tiny_plot(iris, x = Sepal.Length, y = Sepal.Width) ``` -------------------------------- ### Style Cells with Custom CSS IDs (Second Example) Source: https://github.com/vincentarelbundock/tinytable/blob/main/docs/vignettes/style.html Applies custom CSS styles to specific cells using their row and column indices. This is a variation of the cell styling example, demonstrating different CSS IDs. ```javascript const tableFns_hp4aclu198av7kh2oxvr = TinyTable.createTableFunctions("tinytable_hp4aclu198av7kh2oxvr"); window.addEventListener('load', function () { var cellsToStyle = [ { positions: [ { i: '2', j: 1 }, { i: '2', j: 2 } ], css_id: 'tinytable_css_9dqmu9fsfuc053rjgcbo'}, { positions: [ { i: '0', j: 1 }, { i: '0', j: 2 } ], css_id: 'tinytable_css_4n1cy6vv3udgpm276zb4'}, ]; cellsToStyle.forEach(function (group) { group.positions.forEach(function (cell) { tableFns_hp4aclu198av7kh2oxvr.styleCell(cell.i, cell.j, group.css_id); }); }); }); ```