diff --git a/CITATION.html b/CITATION.html index 66990f87..327b7c5b 100644 --- a/CITATION.html +++ b/CITATION.html @@ -232,7 +232,7 @@

Citation

Arel-Bundock V (????). _tinytable: Simple and Configurable Tables in 'HTML', 'LaTeX', 'Markdown', 'Word', 'PNG', and 'Typst' Formats_. R - package version 0.0.2.9001, + package version 0.0.2.9002, https://github.com/vincentarelbundock/tinytable/, <https://vincentarelbundock.github.io/tinytable/>. @@ -241,7 +241,7 @@

Citation

@Manual{, title = {tinytable: Simple and Configurable Tables in 'HTML', 'LaTeX', 'Markdown', 'Word', 'PNG', and 'Typst' Formats}, author = {Vincent Arel-Bundock}, - note = {R package version 0.0.2.9001, https://github.com/vincentarelbundock/tinytable/}, + note = {R package version 0.0.2.9002, https://github.com/vincentarelbundock/tinytable/}, url = {https://vincentarelbundock.github.io/tinytable/}, } diff --git a/NEWS.html b/NEWS.html index da72c2fd..18b5e175 100644 --- a/NEWS.html +++ b/NEWS.html @@ -238,7 +238,7 @@

News

Development

New:

@@ -316,6 +317,10 @@

Arguments

+
+

Details

+

Warning: The style_tt() can normally be used to style the group headers, as expected, but that feature is not available for Markdown and Word tables.

+

Value

An object of class tt representing the table.

@@ -340,11 +345,11 @@

Examples

- tinytable_hfd2od7u1fb6b57rmx0b + tinytable_mvrtl5fduyth0kc2hj1i @@ -362,7 +367,7 @@

Examples

- +
@@ -453,12 +458,12 @@

Examples

diff --git a/man/style_tt.html b/man/style_tt.html index 3f207bfa..b85bece1 100644 --- a/man/style_tt.html +++ b/man/style_tt.html @@ -432,7 +432,7 @@

Arguments

width @@ -592,13 +592,13 @@

Examples

- tinytable_7hpt2cyhhux7n7o5zkrz + tinytable_cj51823z3xb57onp8spx @@ -616,7 +616,7 @@

Examples

-
Foo -Width of the cell or column. Can be NULL for default width. +Width of column in em units. Can be NULL for default width.
+
@@ -669,12 +669,12 @@

Examples

diff --git a/man/tt.html b/man/tt.html index c96415b9..0f58c273 100644 --- a/man/tt.html +++ b/man/tt.html @@ -417,9 +417,9 @@

Examples

- tinytable_o89dl3pgxjeb0koyo818 + tinytable_d4eml3czch5goy2t7i0b @@ -437,7 +437,7 @@

Examples

-
+
@@ -483,12 +483,12 @@

Examples

@@ -517,9 +517,9 @@

Examples

- tinytable_e60mgbe71i3pawl4srmp + tinytable_ypd0zodaovtswitvskcu @@ -537,7 +537,7 @@

Examples

-
+
@@ -583,12 +583,12 @@

Examples

@@ -629,9 +629,9 @@

Examples

- tinytable_bkic4y82qcfi8arap6mr + tinytable_ujsfazdho625n76h3pp2 @@ -649,7 +649,7 @@

Examples

-
Data about cars.
+
@@ -695,12 +695,12 @@

Examples

-
tt(x, notes = list("*" = list(i = 0:1, j = 2, text = "Hello World!")))
-
- - - - - - tinytable_3dtjucynxwlmswz45ngx - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mpgcyl*disphpdrat
* Hello World!
21.06*1601103.90
21.061601103.90
22.84108 933.85
21.462581103.08
-
- - - - - - +
fn <- list(i = 0:1, j = 2, text = "Hello World!")
+tab <- tt(x, notes = list("*" = fn))
+print(tab, "latex")
+
+

+\begin{table}
+\centering
+\begin{talltblr}[         %% tabularray outer open
+entry=none,label=none,
+note{*}={Hello World!},
+]                     %% tabularray outer close
+{                     %% tabularray inner open
+colspec={Q[]Q[]Q[]Q[]Q[]},
+}                     %% tabularray inner close
+\toprule
+mpg & cyl\textsuperscript{*} & disp & hp & drat \\ \midrule %% TinyTableHeader
+21.0 & 6\textsuperscript{*} & 160 & 110 & 3.90 \\
+21.0 & 6 & 160 & 110 & 3.90 \\
+22.8 & 4 & 108 &  93 & 3.85 \\
+21.4 & 6 & 258 & 110 & 3.08 \\
+\bottomrule
+\end{talltblr}
+\end{table}
diff --git a/search.json b/search.json index 9e9a1d0b..d89af9ee 100644 --- a/search.json +++ b/search.json @@ -48,7 +48,7 @@ "href": "CITATION.html", "title": "Citation", "section": "", - "text": "Citation\nTo cite package ‘tinytable’ in publications use:\n\n Arel-Bundock V (????). _tinytable: Simple and Configurable Tables in\n 'HTML', 'LaTeX', 'Markdown', 'Word', 'PNG', and 'Typst' Formats_. R\n package version 0.0.2.9001,\n https://github.com/vincentarelbundock/tinytable/,\n <https://vincentarelbundock.github.io/tinytable/>.\n\nA BibTeX entry for LaTeX users is\n\n @Manual{,\n title = {tinytable: Simple and Configurable Tables in 'HTML', 'LaTeX', 'Markdown', 'Word', 'PNG', and 'Typst' Formats},\n author = {Vincent Arel-Bundock},\n note = {R package version 0.0.2.9001, https://github.com/vincentarelbundock/tinytable/},\n url = {https://vincentarelbundock.github.io/tinytable/},\n }", + "text": "Citation\nTo cite package ‘tinytable’ in publications use:\n\n Arel-Bundock V (????). _tinytable: Simple and Configurable Tables in\n 'HTML', 'LaTeX', 'Markdown', 'Word', 'PNG', and 'Typst' Formats_. R\n package version 0.0.2.9002,\n https://github.com/vincentarelbundock/tinytable/,\n <https://vincentarelbundock.github.io/tinytable/>.\n\nA BibTeX entry for LaTeX users is\n\n @Manual{,\n title = {tinytable: Simple and Configurable Tables in 'HTML', 'LaTeX', 'Markdown', 'Word', 'PNG', and 'Typst' Formats},\n author = {Vincent Arel-Bundock},\n note = {R package version 0.0.2.9002, https://github.com/vincentarelbundock/tinytable/},\n url = {https://vincentarelbundock.github.io/tinytable/},\n }", "crumbs": [ "Tutorial (HTML)", "Citation" @@ -125,7 +125,7 @@ "href": "man/group_tt.html", "title": "tinytable", "section": "", - "text": "Spanning labels to identify groups of rows or columns\n\n\n\ngroup_tt(x, i = NULL, j = NULL, indent = 1)\n\n\n\n\n\n\n\nx\n\n\nA data frame or data table to be rendered as a table.\n\n\n\n\ni\n\n\nA named list of row indices to group. The names of the list will be used as labels.\n\n\n\n\nj\n\n\nA named list of column indices to group. The names of the list will be used as labels. See examples below..\n\n\n\n\nindent\n\n\ninteger number of pt to use when indenting the non-labelled rows.\n\n\n\n\n\n\nAn object of class tt representing the table.\n\n\n\n\nlibrary(tinytable)\n\n\ntt(mtcars[1:10, 1:5]) |>\n group_tt(\n i = list(\n \"Hello\" = 3,\n \"World\" = 8),\n j = list(\n \"Foo\" = 2:3,\n \"Bar\" = 4:5))\n\n \n\n \n \n \n tinytable_hfd2od7u1fb6b57rmx0b\n \n \n \n \n \n\n \n \n \n \n \nFoo\nBar\n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n 18.7\n 8\n 360\n 175\n 3.15\n \n \n 18.1\n 6\n 225\n 105\n 2.76\n \n \n 14.3\n 8\n 360\n 245\n 3.21\n \n \n 24.4\n 4\n 146.7\n 62\n 3.69\n \n \n 22.8\n 4\n 140.8\n 95\n 3.92\n \n \n 19.2\n 6\n 167.6\n 123\n 3.92", + "text": "Spanning labels to identify groups of rows or columns\n\n\n\ngroup_tt(x, i = NULL, j = NULL, indent = 1)\n\n\n\n\n\n\n\nx\n\n\nA data frame or data table to be rendered as a table.\n\n\n\n\ni\n\n\nA named list of row indices to group. The names of the list will be used as labels.\n\n\n\n\nj\n\n\nA named list of column indices to group. The names of the list will be used as labels. See examples below..\n\n\n\n\nindent\n\n\ninteger number of pt to use when indenting the non-labelled rows.\n\n\n\n\n\n\nWarning: The style_tt() can normally be used to style the group headers, as expected, but that feature is not available for Markdown and Word tables.\n\n\n\nAn object of class tt representing the table.\n\n\n\n\nlibrary(tinytable)\n\n\ntt(mtcars[1:10, 1:5]) |>\n group_tt(\n i = list(\n \"Hello\" = 3,\n \"World\" = 8),\n j = list(\n \"Foo\" = 2:3,\n \"Bar\" = 4:5))\n\n \n\n \n \n \n tinytable_mvrtl5fduyth0kc2hj1i\n \n \n \n \n \n\n \n \n \n \n \nFoo\nBar\n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n 18.7\n 8\n 360\n 175\n 3.15\n \n \n 18.1\n 6\n 225\n 105\n 2.76\n \n \n 14.3\n 8\n 360\n 245\n 3.21\n \n \n 24.4\n 4\n 146.7\n 62\n 3.69\n \n \n 22.8\n 4\n 140.8\n 95\n 3.92\n \n \n 19.2\n 6\n 167.6\n 123\n 3.92", "crumbs": [ "Tutorial (HTML)", "Functions", @@ -137,7 +137,7 @@ "href": "man/group_tt.html#spanning-labels-to-identify-groups-of-rows-or-columns", "title": "tinytable", "section": "", - "text": "Spanning labels to identify groups of rows or columns\n\n\n\ngroup_tt(x, i = NULL, j = NULL, indent = 1)\n\n\n\n\n\n\n\nx\n\n\nA data frame or data table to be rendered as a table.\n\n\n\n\ni\n\n\nA named list of row indices to group. The names of the list will be used as labels.\n\n\n\n\nj\n\n\nA named list of column indices to group. The names of the list will be used as labels. See examples below..\n\n\n\n\nindent\n\n\ninteger number of pt to use when indenting the non-labelled rows.\n\n\n\n\n\n\nAn object of class tt representing the table.\n\n\n\n\nlibrary(tinytable)\n\n\ntt(mtcars[1:10, 1:5]) |>\n group_tt(\n i = list(\n \"Hello\" = 3,\n \"World\" = 8),\n j = list(\n \"Foo\" = 2:3,\n \"Bar\" = 4:5))\n\n \n\n \n \n \n tinytable_hfd2od7u1fb6b57rmx0b\n \n \n \n \n \n\n \n \n \n \n \nFoo\nBar\n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n 18.7\n 8\n 360\n 175\n 3.15\n \n \n 18.1\n 6\n 225\n 105\n 2.76\n \n \n 14.3\n 8\n 360\n 245\n 3.21\n \n \n 24.4\n 4\n 146.7\n 62\n 3.69\n \n \n 22.8\n 4\n 140.8\n 95\n 3.92\n \n \n 19.2\n 6\n 167.6\n 123\n 3.92", + "text": "Spanning labels to identify groups of rows or columns\n\n\n\ngroup_tt(x, i = NULL, j = NULL, indent = 1)\n\n\n\n\n\n\n\nx\n\n\nA data frame or data table to be rendered as a table.\n\n\n\n\ni\n\n\nA named list of row indices to group. The names of the list will be used as labels.\n\n\n\n\nj\n\n\nA named list of column indices to group. The names of the list will be used as labels. See examples below..\n\n\n\n\nindent\n\n\ninteger number of pt to use when indenting the non-labelled rows.\n\n\n\n\n\n\nWarning: The style_tt() can normally be used to style the group headers, as expected, but that feature is not available for Markdown and Word tables.\n\n\n\nAn object of class tt representing the table.\n\n\n\n\nlibrary(tinytable)\n\n\ntt(mtcars[1:10, 1:5]) |>\n group_tt(\n i = list(\n \"Hello\" = 3,\n \"World\" = 8),\n j = list(\n \"Foo\" = 2:3,\n \"Bar\" = 4:5))\n\n \n\n \n \n \n tinytable_mvrtl5fduyth0kc2hj1i\n \n \n \n \n \n\n \n \n \n \n \nFoo\nBar\n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n 18.7\n 8\n 360\n 175\n 3.15\n \n \n 18.1\n 6\n 225\n 105\n 2.76\n \n \n 14.3\n 8\n 360\n 245\n 3.21\n \n \n 24.4\n 4\n 146.7\n 62\n 3.69\n \n \n 22.8\n 4\n 140.8\n 95\n 3.92\n \n \n 19.2\n 6\n 167.6\n 123\n 3.92", "crumbs": [ "Tutorial (HTML)", "Functions", @@ -149,14 +149,14 @@ "href": "man/format_tt.html", "title": "tinytable", "section": "", - "text": "This function formats the columns of a data frame based on the column type (logical, date, numeric). It allows various formatting options like significant digits, decimal points, and scientific notation. It also includes custom formatting for date and boolean values.\n\n\n\nformat_tt(\n x,\n j = NULL,\n digits = getOption(\"digits\"),\n num_fmt = \"significant\",\n num_zero = TRUE,\n num_suffix = FALSE,\n num_mark_big = \"\",\n num_mark_dec = getOption(\"OutDec\", default = \".\"),\n date = \"%Y-%m-%d\",\n bool = function(column) tools::toTitleCase(tolower(column)),\n other = as.character,\n markdown = FALSE,\n sprintf = NULL\n)\n\n\n\n\n\n\n\nx\n\n\nA data frame or a vector to be formatted.\n\n\n\n\nj\n\n\nColumn indices where the styling should be applied. Can be a single value, a vector, or a Perl-style regular expression applied to column names of the original data frame. If colspan is used, j must be of length 1.\n\n\n\n\ndigits\n\n\nNumber of significant digits or decimal places.\n\n\n\n\nnum_fmt\n\n\nThe format for numeric values; one of ‘significant’, ‘decimal’, or ‘scientific’.\n\n\n\n\nnum_zero\n\n\nLogical; if TRUE, trailing zeros are kept in \"decimal\" format (but not in \"significant\" format).\n\n\n\n\nnum_suffix\n\n\nLogical; if TRUE display short numbers with digits significant digits and K (thousands), M (millions), B (billions), or T (trillions) suffixes.\n\n\n\n\nnum_mark_big\n\n\nCharacter to use as a thousands separator.\n\n\n\n\nnum_mark_dec\n\n\nDecimal mark character. Default is the global option ‘OutDec’.\n\n\n\n\ndate\n\n\nA string passed to the format() function, such as \"%Y-%m-%d\". See the \"Details\" section in ?strptime\n\n\n\n\nbool\n\n\nA function to format logical columns. Defaults to title case.\n\n\n\n\nother\n\n\nA function to format columns of other types. Defaults to as.character().\n\n\n\n\nmarkdown\n\n\nLogical; if TRUE, render markdown syntax in cells. Ex: italicized text is properly italicized in HTML and LaTeX.\n\n\n\n\nsprintf\n\n\nString passed to the ?sprintf function to format numbers or interpolate strings with a user-defined pattern (similar to the glue package, but using Base R).\n\n\n\n\n\n\nA data frame with formatted columns.\n\n\n\n\nlibrary(tinytable)\n\ndat <- data.frame(\n a = rnorm(3, mean = 10000),\n b = rnorm(3, 10000))\ntab <- tt(dat)\nformat_tt(tab,\n digits = 2,\n num_mark_dec = \",\",\n num_mark_big = \" \")\n\n \n\n \n \n \n tinytable_le6nvz3xvl42gnl171xw\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n \n \n \n \n \n 10 001\n 9 999\n \n \n 10 001\n 10 000\n \n \n 10 002\n 10 000" + "text": "This function formats the columns of a data frame based on the column type (logical, date, numeric). It allows various formatting options like significant digits, decimal points, and scientific notation. It also includes custom formatting for date and boolean values.\n\n\n\nformat_tt(\n x,\n j = NULL,\n digits = getOption(\"digits\"),\n num_fmt = \"significant\",\n num_zero = TRUE,\n num_suffix = FALSE,\n num_mark_big = \"\",\n num_mark_dec = getOption(\"OutDec\", default = \".\"),\n date = \"%Y-%m-%d\",\n bool = function(column) tools::toTitleCase(tolower(column)),\n other = as.character,\n markdown = FALSE,\n sprintf = NULL\n)\n\n\n\n\n\n\n\nx\n\n\nA data frame or a vector to be formatted.\n\n\n\n\nj\n\n\nColumn indices where the styling should be applied. Can be a single value, a vector, or a Perl-style regular expression applied to column names of the original data frame. If colspan is used, j must be of length 1.\n\n\n\n\ndigits\n\n\nNumber of significant digits or decimal places.\n\n\n\n\nnum_fmt\n\n\nThe format for numeric values; one of ‘significant’, ‘decimal’, or ‘scientific’.\n\n\n\n\nnum_zero\n\n\nLogical; if TRUE, trailing zeros are kept in \"decimal\" format (but not in \"significant\" format).\n\n\n\n\nnum_suffix\n\n\nLogical; if TRUE display short numbers with digits significant digits and K (thousands), M (millions), B (billions), or T (trillions) suffixes.\n\n\n\n\nnum_mark_big\n\n\nCharacter to use as a thousands separator.\n\n\n\n\nnum_mark_dec\n\n\nDecimal mark character. Default is the global option ‘OutDec’.\n\n\n\n\ndate\n\n\nA string passed to the format() function, such as \"%Y-%m-%d\". See the \"Details\" section in ?strptime\n\n\n\n\nbool\n\n\nA function to format logical columns. Defaults to title case.\n\n\n\n\nother\n\n\nA function to format columns of other types. Defaults to as.character().\n\n\n\n\nmarkdown\n\n\nLogical; if TRUE, render markdown syntax in cells. Ex: italicized text is properly italicized in HTML and LaTeX.\n\n\n\n\nsprintf\n\n\nString passed to the ?sprintf function to format numbers or interpolate strings with a user-defined pattern (similar to the glue package, but using Base R).\n\n\n\n\n\n\nA data frame with formatted columns.\n\n\n\n\nlibrary(tinytable)\n\ndat <- data.frame(\n a = rnorm(3, mean = 10000),\n b = rnorm(3, 10000))\ntab <- tt(dat)\nformat_tt(tab,\n digits = 2,\n num_mark_dec = \",\",\n num_mark_big = \" \")\n\n \n\n \n \n \n tinytable_nbghv26aa4m1hmmomiyd\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n \n \n \n \n \n 10 001\n 10 001\n \n \n 10 001\n 10 001\n \n \n 10 001\n 9 999" }, { "objectID": "man/format_tt.html#format-columns-of-a-data-frame", "href": "man/format_tt.html#format-columns-of-a-data-frame", "title": "tinytable", "section": "", - "text": "This function formats the columns of a data frame based on the column type (logical, date, numeric). It allows various formatting options like significant digits, decimal points, and scientific notation. It also includes custom formatting for date and boolean values.\n\n\n\nformat_tt(\n x,\n j = NULL,\n digits = getOption(\"digits\"),\n num_fmt = \"significant\",\n num_zero = TRUE,\n num_suffix = FALSE,\n num_mark_big = \"\",\n num_mark_dec = getOption(\"OutDec\", default = \".\"),\n date = \"%Y-%m-%d\",\n bool = function(column) tools::toTitleCase(tolower(column)),\n other = as.character,\n markdown = FALSE,\n sprintf = NULL\n)\n\n\n\n\n\n\n\nx\n\n\nA data frame or a vector to be formatted.\n\n\n\n\nj\n\n\nColumn indices where the styling should be applied. Can be a single value, a vector, or a Perl-style regular expression applied to column names of the original data frame. If colspan is used, j must be of length 1.\n\n\n\n\ndigits\n\n\nNumber of significant digits or decimal places.\n\n\n\n\nnum_fmt\n\n\nThe format for numeric values; one of ‘significant’, ‘decimal’, or ‘scientific’.\n\n\n\n\nnum_zero\n\n\nLogical; if TRUE, trailing zeros are kept in \"decimal\" format (but not in \"significant\" format).\n\n\n\n\nnum_suffix\n\n\nLogical; if TRUE display short numbers with digits significant digits and K (thousands), M (millions), B (billions), or T (trillions) suffixes.\n\n\n\n\nnum_mark_big\n\n\nCharacter to use as a thousands separator.\n\n\n\n\nnum_mark_dec\n\n\nDecimal mark character. Default is the global option ‘OutDec’.\n\n\n\n\ndate\n\n\nA string passed to the format() function, such as \"%Y-%m-%d\". See the \"Details\" section in ?strptime\n\n\n\n\nbool\n\n\nA function to format logical columns. Defaults to title case.\n\n\n\n\nother\n\n\nA function to format columns of other types. Defaults to as.character().\n\n\n\n\nmarkdown\n\n\nLogical; if TRUE, render markdown syntax in cells. Ex: italicized text is properly italicized in HTML and LaTeX.\n\n\n\n\nsprintf\n\n\nString passed to the ?sprintf function to format numbers or interpolate strings with a user-defined pattern (similar to the glue package, but using Base R).\n\n\n\n\n\n\nA data frame with formatted columns.\n\n\n\n\nlibrary(tinytable)\n\ndat <- data.frame(\n a = rnorm(3, mean = 10000),\n b = rnorm(3, 10000))\ntab <- tt(dat)\nformat_tt(tab,\n digits = 2,\n num_mark_dec = \",\",\n num_mark_big = \" \")\n\n \n\n \n \n \n tinytable_le6nvz3xvl42gnl171xw\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n \n \n \n \n \n 10 001\n 9 999\n \n \n 10 001\n 10 000\n \n \n 10 002\n 10 000" + "text": "This function formats the columns of a data frame based on the column type (logical, date, numeric). It allows various formatting options like significant digits, decimal points, and scientific notation. It also includes custom formatting for date and boolean values.\n\n\n\nformat_tt(\n x,\n j = NULL,\n digits = getOption(\"digits\"),\n num_fmt = \"significant\",\n num_zero = TRUE,\n num_suffix = FALSE,\n num_mark_big = \"\",\n num_mark_dec = getOption(\"OutDec\", default = \".\"),\n date = \"%Y-%m-%d\",\n bool = function(column) tools::toTitleCase(tolower(column)),\n other = as.character,\n markdown = FALSE,\n sprintf = NULL\n)\n\n\n\n\n\n\n\nx\n\n\nA data frame or a vector to be formatted.\n\n\n\n\nj\n\n\nColumn indices where the styling should be applied. Can be a single value, a vector, or a Perl-style regular expression applied to column names of the original data frame. If colspan is used, j must be of length 1.\n\n\n\n\ndigits\n\n\nNumber of significant digits or decimal places.\n\n\n\n\nnum_fmt\n\n\nThe format for numeric values; one of ‘significant’, ‘decimal’, or ‘scientific’.\n\n\n\n\nnum_zero\n\n\nLogical; if TRUE, trailing zeros are kept in \"decimal\" format (but not in \"significant\" format).\n\n\n\n\nnum_suffix\n\n\nLogical; if TRUE display short numbers with digits significant digits and K (thousands), M (millions), B (billions), or T (trillions) suffixes.\n\n\n\n\nnum_mark_big\n\n\nCharacter to use as a thousands separator.\n\n\n\n\nnum_mark_dec\n\n\nDecimal mark character. Default is the global option ‘OutDec’.\n\n\n\n\ndate\n\n\nA string passed to the format() function, such as \"%Y-%m-%d\". See the \"Details\" section in ?strptime\n\n\n\n\nbool\n\n\nA function to format logical columns. Defaults to title case.\n\n\n\n\nother\n\n\nA function to format columns of other types. Defaults to as.character().\n\n\n\n\nmarkdown\n\n\nLogical; if TRUE, render markdown syntax in cells. Ex: italicized text is properly italicized in HTML and LaTeX.\n\n\n\n\nsprintf\n\n\nString passed to the ?sprintf function to format numbers or interpolate strings with a user-defined pattern (similar to the glue package, but using Base R).\n\n\n\n\n\n\nA data frame with formatted columns.\n\n\n\n\nlibrary(tinytable)\n\ndat <- data.frame(\n a = rnorm(3, mean = 10000),\n b = rnorm(3, 10000))\ntab <- tt(dat)\nformat_tt(tab,\n digits = 2,\n num_mark_dec = \",\",\n num_mark_big = \" \")\n\n \n\n \n \n \n tinytable_nbghv26aa4m1hmmomiyd\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n \n \n \n \n \n 10 001\n 10 001\n \n \n 10 001\n 10 001\n \n \n 10 001\n 9 999" }, { "objectID": "man/print.tinytable.html", @@ -201,7 +201,7 @@ "href": "man/tt.html", "title": "tinytable", "section": "", - "text": "The tt function renders a table in different formats with various styling options: HTML, Markdown, LaTeX, Word, PDF, PNG, or Typst. The table can be customized with additional functions:\n\n\nstyle_tt() to style fonts, colors, alignment, etc.\n\n\nformat_tt() to format numbers, dates, strings, etc.\n\n\ngroup_tt() for row or column group labels.\n\n\nsave_tt() to save the table to a file or return the table as a string.\n\n\nprint() to print to a specific format, ex: print(x, “latex”)\n\n\ntinytable attempts to determine the appropriate way to print the table based on interactive use, RStudio availability, and output format in RMarkdown or Quarto documents. Users can call print(x, output=“markdown”) to print the table in a specific format. Alternatively, they can set a global option: options(“tinytable_print_output”=“markdown”)\n\n\n\ntt(\n x,\n digits = NULL,\n caption = NULL,\n width = NULL,\n notes = NULL,\n theme = \"default\",\n placement = getOption(\"tinytable_tabularray_placement\", default = NULL)\n)\n\n\n\n\n\n\n\nx\n\n\nA data frame or data table to be rendered as a table.\n\n\n\n\ndigits\n\n\nNumber of significant digits to keep for numeric variables. When digits is an integer, tt() calls format_tt(x, digits = digits) before proceeding to draw the table. Users who need more control can proceed in two steps: (1) format the data with format_tt() or other functions, and (2) pass the formatted data to tt() for drawing. See ?format_tt for more details on formatting options (ex: decimal, scientific notation, dates, boolean variables, etc.).\n\n\n\n\ncaption\n\n\nA string that will be used as the caption of the table.\n\n\n\n\nwidth\n\n\nA numeric value between 0 and 1 indicating the proportion of the line width that the table should cover.\n\n\n\n\nnotes\n\n\nNotes to append to the bottom of the table. This argument accepts several different inputs:\n\n\nSingle string insert a single note: “blah blah”\n\n\nMultiple strings insert multiple notes sequentially: list(“Hello world”, “Foo bar”)\n\n\nA named list inserts a list with the name as superscript: list(“a” = list(“Hello World”))\n\n\nA named list with positions inserts markers as superscripts inside table cells: list(“a” = list(i = 0:1, j = 2, text = “Hello World”))\n\n\n\n\n\n\ntheme\n\n\nThe theme to apply to the table: \"default\", \"striped\", \"bootstrap\", \"void\", or \"grid\".\n\n\n\n\nplacement\n\n\nA string to control the position of tables in LaTeX. Will be inserted in square brackets like: \\begin{table}[H]\n\n\n\n\n\n\nAn object of class tt representing the table.\nThe table object has an attribute which holds information about the structure of the table. This metadata can be accessed with attr(x,“tinytable_meta”). In general, modifying the content of this attribute is not recommended, but it can be useful to some developers, such as those who want to force print to a specific output format without calling print().\n\n\n\nWhen rendering Quarto and Rmarkdown documents, tinytable will populate the LaTeX preamble automatically with all the required packages. For standalone LaTeX packages, these commands should be inserted in the preamble:\n\n\\usepackage{tabularray}\n\\usepackage{float}\n\\usepackage{graphicx}\n\\usepackage{codehigh}\n\\usepackage[normalem]{ulem}\n\\UseTblrLibrary{booktabs}\n\\newcommand{\\tinytableTabularrayUnderline}[1]{\\underline{#1}}\n\\newcommand{\\tinytableTabularrayStrikeout}[1]{\\sout{#1}}\n\\NewTableCommand{\\tinytableDefineColor}[3]{\\definecolor{#1}{#2}{#3}}\n\n\n\n\n\n\nlibrary(tinytable)\n\nlibrary(tinytable)\nx <- mtcars[1:4, 1:5]\n\ntt(x)\n\n \n\n \n \n \n tinytable_o89dl3pgxjeb0koyo818\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\ntt(x,\n theme = \"striped\",\n width = 0.5,\n caption = \"Data about cars.\")\n\n \n\n \n \n \n tinytable_e60mgbe71i3pawl4srmp\n \n \n \n \n \n\n \n \n \n \n Data about cars.\n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\ntt(x, notes = \"Hello World!\")\n\n \n\n \n \n \n tinytable_bkic4y82qcfi8arap6mr\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n Hello World!\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\ntt(x, notes = list(\"*\" = list(i = 0:1, j = 2, text = \"Hello World!\")))\n\n \n\n \n \n \n tinytable_3dtjucynxwlmswz45ngx\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl*\n disp\n hp\n drat\n \n \n * Hello World!\n \n \n 21.0\n 6*\n 160\n 110\n 3.90\n \n \n 21.0\n 6\n 160\n 110\n 3.90\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", + "text": "The tt function renders a table in different formats with various styling options: HTML, Markdown, LaTeX, Word, PDF, PNG, or Typst. The table can be customized with additional functions:\n\n\nstyle_tt() to style fonts, colors, alignment, etc.\n\n\nformat_tt() to format numbers, dates, strings, etc.\n\n\ngroup_tt() for row or column group labels.\n\n\nsave_tt() to save the table to a file or return the table as a string.\n\n\nprint() to print to a specific format, ex: print(x, “latex”)\n\n\ntinytable attempts to determine the appropriate way to print the table based on interactive use, RStudio availability, and output format in RMarkdown or Quarto documents. Users can call print(x, output=“markdown”) to print the table in a specific format. Alternatively, they can set a global option: options(“tinytable_print_output”=“markdown”)\n\n\n\ntt(\n x,\n digits = NULL,\n caption = NULL,\n width = NULL,\n notes = NULL,\n theme = \"default\",\n placement = getOption(\"tinytable_tabularray_placement\", default = NULL)\n)\n\n\n\n\n\n\n\nx\n\n\nA data frame or data table to be rendered as a table.\n\n\n\n\ndigits\n\n\nNumber of significant digits to keep for numeric variables. When digits is an integer, tt() calls format_tt(x, digits = digits) before proceeding to draw the table. Users who need more control can proceed in two steps: (1) format the data with format_tt() or other functions, and (2) pass the formatted data to tt() for drawing. See ?format_tt for more details on formatting options (ex: decimal, scientific notation, dates, boolean variables, etc.).\n\n\n\n\ncaption\n\n\nA string that will be used as the caption of the table.\n\n\n\n\nwidth\n\n\nA numeric value between 0 and 1 indicating the proportion of the line width that the table should cover.\n\n\n\n\nnotes\n\n\nNotes to append to the bottom of the table. This argument accepts several different inputs:\n\n\nSingle string insert a single note: “blah blah”\n\n\nMultiple strings insert multiple notes sequentially: list(“Hello world”, “Foo bar”)\n\n\nA named list inserts a list with the name as superscript: list(“a” = list(“Hello World”))\n\n\nA named list with positions inserts markers as superscripts inside table cells: list(“a” = list(i = 0:1, j = 2, text = “Hello World”))\n\n\n\n\n\n\ntheme\n\n\nThe theme to apply to the table: \"default\", \"striped\", \"bootstrap\", \"void\", or \"grid\".\n\n\n\n\nplacement\n\n\nA string to control the position of tables in LaTeX. Will be inserted in square brackets like: \\begin{table}[H]\n\n\n\n\n\n\nAn object of class tt representing the table.\nThe table object has an attribute which holds information about the structure of the table. This metadata can be accessed with attr(x,“tinytable_meta”). In general, modifying the content of this attribute is not recommended, but it can be useful to some developers, such as those who want to force print to a specific output format without calling print().\n\n\n\nWhen rendering Quarto and Rmarkdown documents, tinytable will populate the LaTeX preamble automatically with all the required packages. For standalone LaTeX packages, these commands should be inserted in the preamble:\n\n\\usepackage{tabularray}\n\\usepackage{float}\n\\usepackage{graphicx}\n\\usepackage{codehigh}\n\\usepackage[normalem]{ulem}\n\\UseTblrLibrary{booktabs}\n\\newcommand{\\tinytableTabularrayUnderline}[1]{\\underline{#1}}\n\\newcommand{\\tinytableTabularrayStrikeout}[1]{\\sout{#1}}\n\\NewTableCommand{\\tinytableDefineColor}[3]{\\definecolor{#1}{#2}{#3}}\n\n\n\n\n\n\nlibrary(tinytable)\n\nlibrary(tinytable)\nx <- mtcars[1:4, 1:5]\n\ntt(x)\n\n \n\n \n \n \n tinytable_d4eml3czch5goy2t7i0b\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\ntt(x,\n theme = \"striped\",\n width = 0.5,\n caption = \"Data about cars.\")\n\n \n\n \n \n \n tinytable_ypd0zodaovtswitvskcu\n \n \n \n \n \n\n \n \n \n \n Data about cars.\n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\ntt(x, notes = \"Hello World!\")\n\n \n\n \n \n \n tinytable_ujsfazdho625n76h3pp2\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n Hello World!\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\nfn <- list(i = 0:1, j = 2, text = \"Hello World!\")\ntab <- tt(x, notes = list(\"*\" = fn))\nprint(tab, \"latex\")\n\n\n\\begin{table}\n\\centering\n\\begin{talltblr}[ %% tabularray outer open\nentry=none,label=none,\nnote{*}={Hello World!},\n] %% tabularray outer close\n{ %% tabularray inner open\ncolspec={Q[]Q[]Q[]Q[]Q[]},\n} %% tabularray inner close\n\\toprule\nmpg & cyl\\textsuperscript{*} & disp & hp & drat \\\\ \\midrule %% TinyTableHeader\n21.0 & 6\\textsuperscript{*} & 160 & 110 & 3.90 \\\\\n21.0 & 6 & 160 & 110 & 3.90 \\\\\n22.8 & 4 & 108 & 93 & 3.85 \\\\\n21.4 & 6 & 258 & 110 & 3.08 \\\\\n\\bottomrule\n\\end{talltblr}\n\\end{table}", "crumbs": [ "Tutorial (HTML)", "Functions", @@ -213,7 +213,7 @@ "href": "man/tt.html#draw-a-tiny-table", "title": "tinytable", "section": "", - "text": "The tt function renders a table in different formats with various styling options: HTML, Markdown, LaTeX, Word, PDF, PNG, or Typst. The table can be customized with additional functions:\n\n\nstyle_tt() to style fonts, colors, alignment, etc.\n\n\nformat_tt() to format numbers, dates, strings, etc.\n\n\ngroup_tt() for row or column group labels.\n\n\nsave_tt() to save the table to a file or return the table as a string.\n\n\nprint() to print to a specific format, ex: print(x, “latex”)\n\n\ntinytable attempts to determine the appropriate way to print the table based on interactive use, RStudio availability, and output format in RMarkdown or Quarto documents. Users can call print(x, output=“markdown”) to print the table in a specific format. Alternatively, they can set a global option: options(“tinytable_print_output”=“markdown”)\n\n\n\ntt(\n x,\n digits = NULL,\n caption = NULL,\n width = NULL,\n notes = NULL,\n theme = \"default\",\n placement = getOption(\"tinytable_tabularray_placement\", default = NULL)\n)\n\n\n\n\n\n\n\nx\n\n\nA data frame or data table to be rendered as a table.\n\n\n\n\ndigits\n\n\nNumber of significant digits to keep for numeric variables. When digits is an integer, tt() calls format_tt(x, digits = digits) before proceeding to draw the table. Users who need more control can proceed in two steps: (1) format the data with format_tt() or other functions, and (2) pass the formatted data to tt() for drawing. See ?format_tt for more details on formatting options (ex: decimal, scientific notation, dates, boolean variables, etc.).\n\n\n\n\ncaption\n\n\nA string that will be used as the caption of the table.\n\n\n\n\nwidth\n\n\nA numeric value between 0 and 1 indicating the proportion of the line width that the table should cover.\n\n\n\n\nnotes\n\n\nNotes to append to the bottom of the table. This argument accepts several different inputs:\n\n\nSingle string insert a single note: “blah blah”\n\n\nMultiple strings insert multiple notes sequentially: list(“Hello world”, “Foo bar”)\n\n\nA named list inserts a list with the name as superscript: list(“a” = list(“Hello World”))\n\n\nA named list with positions inserts markers as superscripts inside table cells: list(“a” = list(i = 0:1, j = 2, text = “Hello World”))\n\n\n\n\n\n\ntheme\n\n\nThe theme to apply to the table: \"default\", \"striped\", \"bootstrap\", \"void\", or \"grid\".\n\n\n\n\nplacement\n\n\nA string to control the position of tables in LaTeX. Will be inserted in square brackets like: \\begin{table}[H]\n\n\n\n\n\n\nAn object of class tt representing the table.\nThe table object has an attribute which holds information about the structure of the table. This metadata can be accessed with attr(x,“tinytable_meta”). In general, modifying the content of this attribute is not recommended, but it can be useful to some developers, such as those who want to force print to a specific output format without calling print().\n\n\n\nWhen rendering Quarto and Rmarkdown documents, tinytable will populate the LaTeX preamble automatically with all the required packages. For standalone LaTeX packages, these commands should be inserted in the preamble:\n\n\\usepackage{tabularray}\n\\usepackage{float}\n\\usepackage{graphicx}\n\\usepackage{codehigh}\n\\usepackage[normalem]{ulem}\n\\UseTblrLibrary{booktabs}\n\\newcommand{\\tinytableTabularrayUnderline}[1]{\\underline{#1}}\n\\newcommand{\\tinytableTabularrayStrikeout}[1]{\\sout{#1}}\n\\NewTableCommand{\\tinytableDefineColor}[3]{\\definecolor{#1}{#2}{#3}}\n\n\n\n\n\n\nlibrary(tinytable)\n\nlibrary(tinytable)\nx <- mtcars[1:4, 1:5]\n\ntt(x)\n\n \n\n \n \n \n tinytable_o89dl3pgxjeb0koyo818\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\ntt(x,\n theme = \"striped\",\n width = 0.5,\n caption = \"Data about cars.\")\n\n \n\n \n \n \n tinytable_e60mgbe71i3pawl4srmp\n \n \n \n \n \n\n \n \n \n \n Data about cars.\n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\ntt(x, notes = \"Hello World!\")\n\n \n\n \n \n \n tinytable_bkic4y82qcfi8arap6mr\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n Hello World!\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\ntt(x, notes = list(\"*\" = list(i = 0:1, j = 2, text = \"Hello World!\")))\n\n \n\n \n \n \n tinytable_3dtjucynxwlmswz45ngx\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl*\n disp\n hp\n drat\n \n \n * Hello World!\n \n \n 21.0\n 6*\n 160\n 110\n 3.90\n \n \n 21.0\n 6\n 160\n 110\n 3.90\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", + "text": "The tt function renders a table in different formats with various styling options: HTML, Markdown, LaTeX, Word, PDF, PNG, or Typst. The table can be customized with additional functions:\n\n\nstyle_tt() to style fonts, colors, alignment, etc.\n\n\nformat_tt() to format numbers, dates, strings, etc.\n\n\ngroup_tt() for row or column group labels.\n\n\nsave_tt() to save the table to a file or return the table as a string.\n\n\nprint() to print to a specific format, ex: print(x, “latex”)\n\n\ntinytable attempts to determine the appropriate way to print the table based on interactive use, RStudio availability, and output format in RMarkdown or Quarto documents. Users can call print(x, output=“markdown”) to print the table in a specific format. Alternatively, they can set a global option: options(“tinytable_print_output”=“markdown”)\n\n\n\ntt(\n x,\n digits = NULL,\n caption = NULL,\n width = NULL,\n notes = NULL,\n theme = \"default\",\n placement = getOption(\"tinytable_tabularray_placement\", default = NULL)\n)\n\n\n\n\n\n\n\nx\n\n\nA data frame or data table to be rendered as a table.\n\n\n\n\ndigits\n\n\nNumber of significant digits to keep for numeric variables. When digits is an integer, tt() calls format_tt(x, digits = digits) before proceeding to draw the table. Users who need more control can proceed in two steps: (1) format the data with format_tt() or other functions, and (2) pass the formatted data to tt() for drawing. See ?format_tt for more details on formatting options (ex: decimal, scientific notation, dates, boolean variables, etc.).\n\n\n\n\ncaption\n\n\nA string that will be used as the caption of the table.\n\n\n\n\nwidth\n\n\nA numeric value between 0 and 1 indicating the proportion of the line width that the table should cover.\n\n\n\n\nnotes\n\n\nNotes to append to the bottom of the table. This argument accepts several different inputs:\n\n\nSingle string insert a single note: “blah blah”\n\n\nMultiple strings insert multiple notes sequentially: list(“Hello world”, “Foo bar”)\n\n\nA named list inserts a list with the name as superscript: list(“a” = list(“Hello World”))\n\n\nA named list with positions inserts markers as superscripts inside table cells: list(“a” = list(i = 0:1, j = 2, text = “Hello World”))\n\n\n\n\n\n\ntheme\n\n\nThe theme to apply to the table: \"default\", \"striped\", \"bootstrap\", \"void\", or \"grid\".\n\n\n\n\nplacement\n\n\nA string to control the position of tables in LaTeX. Will be inserted in square brackets like: \\begin{table}[H]\n\n\n\n\n\n\nAn object of class tt representing the table.\nThe table object has an attribute which holds information about the structure of the table. This metadata can be accessed with attr(x,“tinytable_meta”). In general, modifying the content of this attribute is not recommended, but it can be useful to some developers, such as those who want to force print to a specific output format without calling print().\n\n\n\nWhen rendering Quarto and Rmarkdown documents, tinytable will populate the LaTeX preamble automatically with all the required packages. For standalone LaTeX packages, these commands should be inserted in the preamble:\n\n\\usepackage{tabularray}\n\\usepackage{float}\n\\usepackage{graphicx}\n\\usepackage{codehigh}\n\\usepackage[normalem]{ulem}\n\\UseTblrLibrary{booktabs}\n\\newcommand{\\tinytableTabularrayUnderline}[1]{\\underline{#1}}\n\\newcommand{\\tinytableTabularrayStrikeout}[1]{\\sout{#1}}\n\\NewTableCommand{\\tinytableDefineColor}[3]{\\definecolor{#1}{#2}{#3}}\n\n\n\n\n\n\nlibrary(tinytable)\n\nlibrary(tinytable)\nx <- mtcars[1:4, 1:5]\n\ntt(x)\n\n \n\n \n \n \n tinytable_d4eml3czch5goy2t7i0b\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\ntt(x,\n theme = \"striped\",\n width = 0.5,\n caption = \"Data about cars.\")\n\n \n\n \n \n \n tinytable_ypd0zodaovtswitvskcu\n \n \n \n \n \n\n \n \n \n \n Data about cars.\n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\ntt(x, notes = \"Hello World!\")\n\n \n\n \n \n \n tinytable_ujsfazdho625n76h3pp2\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n Hello World!\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\nfn <- list(i = 0:1, j = 2, text = \"Hello World!\")\ntab <- tt(x, notes = list(\"*\" = fn))\nprint(tab, \"latex\")\n\n\n\\begin{table}\n\\centering\n\\begin{talltblr}[ %% tabularray outer open\nentry=none,label=none,\nnote{*}={Hello World!},\n] %% tabularray outer close\n{ %% tabularray inner open\ncolspec={Q[]Q[]Q[]Q[]Q[]},\n} %% tabularray inner close\n\\toprule\nmpg & cyl\\textsuperscript{*} & disp & hp & drat \\\\ \\midrule %% TinyTableHeader\n21.0 & 6\\textsuperscript{*} & 160 & 110 & 3.90 \\\\\n21.0 & 6 & 160 & 110 & 3.90 \\\\\n22.8 & 4 & 108 & 93 & 3.85 \\\\\n21.4 & 6 & 258 & 110 & 3.08 \\\\\n\\bottomrule\n\\end{talltblr}\n\\end{table}", "crumbs": [ "Tutorial (HTML)", "Functions", @@ -249,7 +249,7 @@ "href": "man/style_tt.html", "title": "tinytable", "section": "", - "text": "Style a Tiny Table\n\n\n\nstyle_tt(\n x,\n i = NULL,\n j = NULL,\n bold = FALSE,\n italic = FALSE,\n monospace = FALSE,\n underline = FALSE,\n strikeout = FALSE,\n color = NULL,\n background = NULL,\n fontsize = NULL,\n width = NULL,\n align = NULL,\n colspan = NULL,\n indent = 0,\n line = NULL,\n line_color = \"black\",\n line_width = 0.1,\n tabularray_inner = NULL,\n tabularray_outer = NULL,\n bootstrap_class = NULL,\n bootstrap_css = NULL,\n bootstrap_css_rule = NULL,\n ...\n)\n\n\n\n\n\n\n\nx\n\n\nA table object created by tt().\n\n\n\n\ni\n\n\nRow indices where the styling should be applied. Can be a single value or a vector. i=0 is the header, and negative values are higher level headers. If colspan is used, i must be of length 1.\n\n\n\n\nj\n\n\nColumn indices where the styling should be applied. Can be a single value, a vector, or a Perl-style regular expression applied to column names of the original data frame. If colspan is used, j must be of length 1.\n\n\n\n\nbold\n\n\nLogical; if TRUE, text is styled in bold.\n\n\n\n\nitalic\n\n\nLogical; if TRUE, text is styled in italic.\n\n\n\n\nmonospace\n\n\nLogical; if TRUE, text is styled in monospace font.\n\n\n\n\nunderline\n\n\nLogical; if TRUE, text is underlined.\n\n\n\n\nstrikeout\n\n\nLogical; if TRUE, text has a strike through line.\n\n\n\n\ncolor\n\n\nText color. There are several ways to specify colors, depending on the output format.\n\n\nHTML:\n\n\nHex code composed of # and 6 characters, ex: #CC79A7.\n\n\nKeywords: black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua\n\n\n\n\nLaTeX:\n\n\nHex code composed of # and 6 characters, ex: \"#CC79A7\". See the section below for instructions to add in LaTeX preambles.\n\n\nKeywords: black, blue, brown, cyan, darkgray, gray, green, lightgray, lime, magenta, olive, orange, pink, purple, red, teal, violet, white, yellow.\n\n\nColor blending using xcolor, ex: white!80!blue, green!20!red’.\n\n\nColor names with luminance levels from the ninecolors package (ex: \"azure4\", \"magenta8\", \"teal2\", \"gray1\", \"olive3\").\n\n\n\n\n\n\n\n\nbackground\n\n\nBackground color. Specified as a color name or hexadecimal code. Can be NULL for default color.\n\n\n\n\nfontsize\n\n\nInteger Font size in pt units.\n\n\n\n\nwidth\n\n\nWidth of the cell or column. Can be NULL for default width.\n\n\n\n\nalign\n\n\nA single character or a string with a number of characters equal to the number of columns in j. Valid characters include ‘c’ (center), ‘l’ (left), or ‘r’ (right).\n\n\n\n\ncolspan\n\n\nNumber of columns a cell should span. Can only be used if both i and j are of length 1. Must be an integer greater than 1.\n\n\n\n\nindent\n\n\nText indentation in em units. Positive values only.\n\n\n\n\nline\n\n\nString determines if solid lines (rules or borders) should be drawn around the cell, row, or column.\n\n\n\"t\": top\n\n\n\"b\": bottom\n\n\n\"l\": left\n\n\n\"r\": right\n\n\nCan be combined such as: \"lbt\" to draw borders at the left, bottom, and top.\n\n\n\n\n\n\nline_color\n\n\nColor of the line. See the color argument for details.\n\n\n\n\nline_width\n\n\nWidth of the line in em units (default: 0.1).\n\n\n\n\ntabularray_inner\n\n\nA string that specifies the \"inner\" settings of a tabularray LaTeX table.\n\n\n\n\ntabularray_outer\n\n\nA string that specifies the \"outer\" settings of a tabularray LaTeX table.\n\n\n\n\nbootstrap_class\n\n\nString. A Bootstrap table class such as “table”, “table table-dark” or “table table-dark table-hover”. See the bootstrap documentation.\n\n\n\n\nbootstrap_css\n\n\nA vector of CSS style declarations to be applied (ex: “font-weight: bold”). Each element corresponds to a cell defined by i and j.\n\n\n\n\nbootstrap_css_rule\n\n\nA string with complete CSS rules that apply to the table class specified using the theme argument of the tt() function.\n\n\n\n\n…\n\n\nextra arguments are ignored\n\n\n\n\n\n\nThis function applies styling to a table created by tt(). It allows customization of text style (bold, italic, monospace), text and background colors, font size, cell width, text alignment, column span, and indentation. The function also supports passing native instructions to LaTeX (tabularray) and HTML (bootstrap) formats.\nWarning: Markdown and Word formats are limited to these styles: italic, bold, strikeout. This is because there is no markdown syntax for the other options, and because we create Word documents by converting a markdown table to .docx via the Pandoc software.\n\n\n\nAn object of class tt representing the table.\n\n\n\nWhen rendering Quarto and Rmarkdown documents, tinytable will populate the LaTeX preamble automatically with all the required packages. For standalone LaTeX packages, these commands should be inserted in the preamble:\n\n\\usepackage{tabularray}\n\\usepackage{float}\n\\usepackage{graphicx}\n\\usepackage{codehigh}\n\\usepackage[normalem]{ulem}\n\\UseTblrLibrary{booktabs}\n\\newcommand{\\tinytableTabularrayUnderline}[1]{\\underline{#1}}\n\\newcommand{\\tinytableTabularrayStrikeout}[1]{\\sout{#1}}\n\\NewTableCommand{\\tinytableDefineColor}[3]{\\definecolor{#1}{#2}{#3}}\n\n\n\n\n\n\nlibrary(tinytable)\n\nlibrary(tinytable)\nx <- mtcars[1:5, 1:5]\ntab <- tt(x)\ntab <- style_tt(tab, j = 1:5, align = \"lcccr\")\ntab <- style_tt(tab, i = 2:3, background = \"black\", color = \"orange\", bold = TRUE)\ntab\n\n \n\n \n \n \n tinytable_7hpt2cyhhux7n7o5zkrz\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n 18.7\n 8\n 360\n 175\n 3.15", + "text": "Style a Tiny Table\n\n\n\nstyle_tt(\n x,\n i = NULL,\n j = NULL,\n bold = FALSE,\n italic = FALSE,\n monospace = FALSE,\n underline = FALSE,\n strikeout = FALSE,\n color = NULL,\n background = NULL,\n fontsize = NULL,\n width = NULL,\n align = NULL,\n colspan = NULL,\n indent = 0,\n line = NULL,\n line_color = \"black\",\n line_width = 0.1,\n tabularray_inner = NULL,\n tabularray_outer = NULL,\n bootstrap_class = NULL,\n bootstrap_css = NULL,\n bootstrap_css_rule = NULL,\n ...\n)\n\n\n\n\n\n\n\nx\n\n\nA table object created by tt().\n\n\n\n\ni\n\n\nRow indices where the styling should be applied. Can be a single value or a vector. i=0 is the header, and negative values are higher level headers. If colspan is used, i must be of length 1.\n\n\n\n\nj\n\n\nColumn indices where the styling should be applied. Can be a single value, a vector, or a Perl-style regular expression applied to column names of the original data frame. If colspan is used, j must be of length 1.\n\n\n\n\nbold\n\n\nLogical; if TRUE, text is styled in bold.\n\n\n\n\nitalic\n\n\nLogical; if TRUE, text is styled in italic.\n\n\n\n\nmonospace\n\n\nLogical; if TRUE, text is styled in monospace font.\n\n\n\n\nunderline\n\n\nLogical; if TRUE, text is underlined.\n\n\n\n\nstrikeout\n\n\nLogical; if TRUE, text has a strike through line.\n\n\n\n\ncolor\n\n\nText color. There are several ways to specify colors, depending on the output format.\n\n\nHTML:\n\n\nHex code composed of # and 6 characters, ex: #CC79A7.\n\n\nKeywords: black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua\n\n\n\n\nLaTeX:\n\n\nHex code composed of # and 6 characters, ex: \"#CC79A7\". See the section below for instructions to add in LaTeX preambles.\n\n\nKeywords: black, blue, brown, cyan, darkgray, gray, green, lightgray, lime, magenta, olive, orange, pink, purple, red, teal, violet, white, yellow.\n\n\nColor blending using xcolor, ex: white!80!blue, green!20!red’.\n\n\nColor names with luminance levels from the ninecolors package (ex: \"azure4\", \"magenta8\", \"teal2\", \"gray1\", \"olive3\").\n\n\n\n\n\n\n\n\nbackground\n\n\nBackground color. Specified as a color name or hexadecimal code. Can be NULL for default color.\n\n\n\n\nfontsize\n\n\nInteger Font size in pt units.\n\n\n\n\nwidth\n\n\nWidth of column in em units. Can be NULL for default width.\n\n\n\n\nalign\n\n\nA single character or a string with a number of characters equal to the number of columns in j. Valid characters include ‘c’ (center), ‘l’ (left), or ‘r’ (right).\n\n\n\n\ncolspan\n\n\nNumber of columns a cell should span. Can only be used if both i and j are of length 1. Must be an integer greater than 1.\n\n\n\n\nindent\n\n\nText indentation in em units. Positive values only.\n\n\n\n\nline\n\n\nString determines if solid lines (rules or borders) should be drawn around the cell, row, or column.\n\n\n\"t\": top\n\n\n\"b\": bottom\n\n\n\"l\": left\n\n\n\"r\": right\n\n\nCan be combined such as: \"lbt\" to draw borders at the left, bottom, and top.\n\n\n\n\n\n\nline_color\n\n\nColor of the line. See the color argument for details.\n\n\n\n\nline_width\n\n\nWidth of the line in em units (default: 0.1).\n\n\n\n\ntabularray_inner\n\n\nA string that specifies the \"inner\" settings of a tabularray LaTeX table.\n\n\n\n\ntabularray_outer\n\n\nA string that specifies the \"outer\" settings of a tabularray LaTeX table.\n\n\n\n\nbootstrap_class\n\n\nString. A Bootstrap table class such as “table”, “table table-dark” or “table table-dark table-hover”. See the bootstrap documentation.\n\n\n\n\nbootstrap_css\n\n\nA vector of CSS style declarations to be applied (ex: “font-weight: bold”). Each element corresponds to a cell defined by i and j.\n\n\n\n\nbootstrap_css_rule\n\n\nA string with complete CSS rules that apply to the table class specified using the theme argument of the tt() function.\n\n\n\n\n…\n\n\nextra arguments are ignored\n\n\n\n\n\n\nThis function applies styling to a table created by tt(). It allows customization of text style (bold, italic, monospace), text and background colors, font size, cell width, text alignment, column span, and indentation. The function also supports passing native instructions to LaTeX (tabularray) and HTML (bootstrap) formats.\nWarning: Markdown and Word formats are limited to these styles: italic, bold, strikeout. This is because there is no markdown syntax for the other options, and because we create Word documents by converting a markdown table to .docx via the Pandoc software.\n\n\n\nAn object of class tt representing the table.\n\n\n\nWhen rendering Quarto and Rmarkdown documents, tinytable will populate the LaTeX preamble automatically with all the required packages. For standalone LaTeX packages, these commands should be inserted in the preamble:\n\n\\usepackage{tabularray}\n\\usepackage{float}\n\\usepackage{graphicx}\n\\usepackage{codehigh}\n\\usepackage[normalem]{ulem}\n\\UseTblrLibrary{booktabs}\n\\newcommand{\\tinytableTabularrayUnderline}[1]{\\underline{#1}}\n\\newcommand{\\tinytableTabularrayStrikeout}[1]{\\sout{#1}}\n\\NewTableCommand{\\tinytableDefineColor}[3]{\\definecolor{#1}{#2}{#3}}\n\n\n\n\n\n\nlibrary(tinytable)\n\nlibrary(tinytable)\nx <- mtcars[1:5, 1:5]\ntab <- tt(x)\ntab <- style_tt(tab, j = 1:5, align = \"lcccr\")\ntab <- style_tt(tab, i = 2:3, background = \"black\", color = \"orange\", bold = TRUE)\ntab\n\n \n\n \n \n \n tinytable_cj51823z3xb57onp8spx\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n 18.7\n 8\n 360\n 175\n 3.15", "crumbs": [ "Tutorial (HTML)", "Functions", @@ -261,7 +261,7 @@ "href": "man/style_tt.html#style-a-tiny-table", "title": "tinytable", "section": "", - "text": "Style a Tiny Table\n\n\n\nstyle_tt(\n x,\n i = NULL,\n j = NULL,\n bold = FALSE,\n italic = FALSE,\n monospace = FALSE,\n underline = FALSE,\n strikeout = FALSE,\n color = NULL,\n background = NULL,\n fontsize = NULL,\n width = NULL,\n align = NULL,\n colspan = NULL,\n indent = 0,\n line = NULL,\n line_color = \"black\",\n line_width = 0.1,\n tabularray_inner = NULL,\n tabularray_outer = NULL,\n bootstrap_class = NULL,\n bootstrap_css = NULL,\n bootstrap_css_rule = NULL,\n ...\n)\n\n\n\n\n\n\n\nx\n\n\nA table object created by tt().\n\n\n\n\ni\n\n\nRow indices where the styling should be applied. Can be a single value or a vector. i=0 is the header, and negative values are higher level headers. If colspan is used, i must be of length 1.\n\n\n\n\nj\n\n\nColumn indices where the styling should be applied. Can be a single value, a vector, or a Perl-style regular expression applied to column names of the original data frame. If colspan is used, j must be of length 1.\n\n\n\n\nbold\n\n\nLogical; if TRUE, text is styled in bold.\n\n\n\n\nitalic\n\n\nLogical; if TRUE, text is styled in italic.\n\n\n\n\nmonospace\n\n\nLogical; if TRUE, text is styled in monospace font.\n\n\n\n\nunderline\n\n\nLogical; if TRUE, text is underlined.\n\n\n\n\nstrikeout\n\n\nLogical; if TRUE, text has a strike through line.\n\n\n\n\ncolor\n\n\nText color. There are several ways to specify colors, depending on the output format.\n\n\nHTML:\n\n\nHex code composed of # and 6 characters, ex: #CC79A7.\n\n\nKeywords: black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua\n\n\n\n\nLaTeX:\n\n\nHex code composed of # and 6 characters, ex: \"#CC79A7\". See the section below for instructions to add in LaTeX preambles.\n\n\nKeywords: black, blue, brown, cyan, darkgray, gray, green, lightgray, lime, magenta, olive, orange, pink, purple, red, teal, violet, white, yellow.\n\n\nColor blending using xcolor, ex: white!80!blue, green!20!red’.\n\n\nColor names with luminance levels from the ninecolors package (ex: \"azure4\", \"magenta8\", \"teal2\", \"gray1\", \"olive3\").\n\n\n\n\n\n\n\n\nbackground\n\n\nBackground color. Specified as a color name or hexadecimal code. Can be NULL for default color.\n\n\n\n\nfontsize\n\n\nInteger Font size in pt units.\n\n\n\n\nwidth\n\n\nWidth of the cell or column. Can be NULL for default width.\n\n\n\n\nalign\n\n\nA single character or a string with a number of characters equal to the number of columns in j. Valid characters include ‘c’ (center), ‘l’ (left), or ‘r’ (right).\n\n\n\n\ncolspan\n\n\nNumber of columns a cell should span. Can only be used if both i and j are of length 1. Must be an integer greater than 1.\n\n\n\n\nindent\n\n\nText indentation in em units. Positive values only.\n\n\n\n\nline\n\n\nString determines if solid lines (rules or borders) should be drawn around the cell, row, or column.\n\n\n\"t\": top\n\n\n\"b\": bottom\n\n\n\"l\": left\n\n\n\"r\": right\n\n\nCan be combined such as: \"lbt\" to draw borders at the left, bottom, and top.\n\n\n\n\n\n\nline_color\n\n\nColor of the line. See the color argument for details.\n\n\n\n\nline_width\n\n\nWidth of the line in em units (default: 0.1).\n\n\n\n\ntabularray_inner\n\n\nA string that specifies the \"inner\" settings of a tabularray LaTeX table.\n\n\n\n\ntabularray_outer\n\n\nA string that specifies the \"outer\" settings of a tabularray LaTeX table.\n\n\n\n\nbootstrap_class\n\n\nString. A Bootstrap table class such as “table”, “table table-dark” or “table table-dark table-hover”. See the bootstrap documentation.\n\n\n\n\nbootstrap_css\n\n\nA vector of CSS style declarations to be applied (ex: “font-weight: bold”). Each element corresponds to a cell defined by i and j.\n\n\n\n\nbootstrap_css_rule\n\n\nA string with complete CSS rules that apply to the table class specified using the theme argument of the tt() function.\n\n\n\n\n…\n\n\nextra arguments are ignored\n\n\n\n\n\n\nThis function applies styling to a table created by tt(). It allows customization of text style (bold, italic, monospace), text and background colors, font size, cell width, text alignment, column span, and indentation. The function also supports passing native instructions to LaTeX (tabularray) and HTML (bootstrap) formats.\nWarning: Markdown and Word formats are limited to these styles: italic, bold, strikeout. This is because there is no markdown syntax for the other options, and because we create Word documents by converting a markdown table to .docx via the Pandoc software.\n\n\n\nAn object of class tt representing the table.\n\n\n\nWhen rendering Quarto and Rmarkdown documents, tinytable will populate the LaTeX preamble automatically with all the required packages. For standalone LaTeX packages, these commands should be inserted in the preamble:\n\n\\usepackage{tabularray}\n\\usepackage{float}\n\\usepackage{graphicx}\n\\usepackage{codehigh}\n\\usepackage[normalem]{ulem}\n\\UseTblrLibrary{booktabs}\n\\newcommand{\\tinytableTabularrayUnderline}[1]{\\underline{#1}}\n\\newcommand{\\tinytableTabularrayStrikeout}[1]{\\sout{#1}}\n\\NewTableCommand{\\tinytableDefineColor}[3]{\\definecolor{#1}{#2}{#3}}\n\n\n\n\n\n\nlibrary(tinytable)\n\nlibrary(tinytable)\nx <- mtcars[1:5, 1:5]\ntab <- tt(x)\ntab <- style_tt(tab, j = 1:5, align = \"lcccr\")\ntab <- style_tt(tab, i = 2:3, background = \"black\", color = \"orange\", bold = TRUE)\ntab\n\n \n\n \n \n \n tinytable_7hpt2cyhhux7n7o5zkrz\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n 18.7\n 8\n 360\n 175\n 3.15", + "text": "Style a Tiny Table\n\n\n\nstyle_tt(\n x,\n i = NULL,\n j = NULL,\n bold = FALSE,\n italic = FALSE,\n monospace = FALSE,\n underline = FALSE,\n strikeout = FALSE,\n color = NULL,\n background = NULL,\n fontsize = NULL,\n width = NULL,\n align = NULL,\n colspan = NULL,\n indent = 0,\n line = NULL,\n line_color = \"black\",\n line_width = 0.1,\n tabularray_inner = NULL,\n tabularray_outer = NULL,\n bootstrap_class = NULL,\n bootstrap_css = NULL,\n bootstrap_css_rule = NULL,\n ...\n)\n\n\n\n\n\n\n\nx\n\n\nA table object created by tt().\n\n\n\n\ni\n\n\nRow indices where the styling should be applied. Can be a single value or a vector. i=0 is the header, and negative values are higher level headers. If colspan is used, i must be of length 1.\n\n\n\n\nj\n\n\nColumn indices where the styling should be applied. Can be a single value, a vector, or a Perl-style regular expression applied to column names of the original data frame. If colspan is used, j must be of length 1.\n\n\n\n\nbold\n\n\nLogical; if TRUE, text is styled in bold.\n\n\n\n\nitalic\n\n\nLogical; if TRUE, text is styled in italic.\n\n\n\n\nmonospace\n\n\nLogical; if TRUE, text is styled in monospace font.\n\n\n\n\nunderline\n\n\nLogical; if TRUE, text is underlined.\n\n\n\n\nstrikeout\n\n\nLogical; if TRUE, text has a strike through line.\n\n\n\n\ncolor\n\n\nText color. There are several ways to specify colors, depending on the output format.\n\n\nHTML:\n\n\nHex code composed of # and 6 characters, ex: #CC79A7.\n\n\nKeywords: black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua\n\n\n\n\nLaTeX:\n\n\nHex code composed of # and 6 characters, ex: \"#CC79A7\". See the section below for instructions to add in LaTeX preambles.\n\n\nKeywords: black, blue, brown, cyan, darkgray, gray, green, lightgray, lime, magenta, olive, orange, pink, purple, red, teal, violet, white, yellow.\n\n\nColor blending using xcolor, ex: white!80!blue, green!20!red’.\n\n\nColor names with luminance levels from the ninecolors package (ex: \"azure4\", \"magenta8\", \"teal2\", \"gray1\", \"olive3\").\n\n\n\n\n\n\n\n\nbackground\n\n\nBackground color. Specified as a color name or hexadecimal code. Can be NULL for default color.\n\n\n\n\nfontsize\n\n\nInteger Font size in pt units.\n\n\n\n\nwidth\n\n\nWidth of column in em units. Can be NULL for default width.\n\n\n\n\nalign\n\n\nA single character or a string with a number of characters equal to the number of columns in j. Valid characters include ‘c’ (center), ‘l’ (left), or ‘r’ (right).\n\n\n\n\ncolspan\n\n\nNumber of columns a cell should span. Can only be used if both i and j are of length 1. Must be an integer greater than 1.\n\n\n\n\nindent\n\n\nText indentation in em units. Positive values only.\n\n\n\n\nline\n\n\nString determines if solid lines (rules or borders) should be drawn around the cell, row, or column.\n\n\n\"t\": top\n\n\n\"b\": bottom\n\n\n\"l\": left\n\n\n\"r\": right\n\n\nCan be combined such as: \"lbt\" to draw borders at the left, bottom, and top.\n\n\n\n\n\n\nline_color\n\n\nColor of the line. See the color argument for details.\n\n\n\n\nline_width\n\n\nWidth of the line in em units (default: 0.1).\n\n\n\n\ntabularray_inner\n\n\nA string that specifies the \"inner\" settings of a tabularray LaTeX table.\n\n\n\n\ntabularray_outer\n\n\nA string that specifies the \"outer\" settings of a tabularray LaTeX table.\n\n\n\n\nbootstrap_class\n\n\nString. A Bootstrap table class such as “table”, “table table-dark” or “table table-dark table-hover”. See the bootstrap documentation.\n\n\n\n\nbootstrap_css\n\n\nA vector of CSS style declarations to be applied (ex: “font-weight: bold”). Each element corresponds to a cell defined by i and j.\n\n\n\n\nbootstrap_css_rule\n\n\nA string with complete CSS rules that apply to the table class specified using the theme argument of the tt() function.\n\n\n\n\n…\n\n\nextra arguments are ignored\n\n\n\n\n\n\nThis function applies styling to a table created by tt(). It allows customization of text style (bold, italic, monospace), text and background colors, font size, cell width, text alignment, column span, and indentation. The function also supports passing native instructions to LaTeX (tabularray) and HTML (bootstrap) formats.\nWarning: Markdown and Word formats are limited to these styles: italic, bold, strikeout. This is because there is no markdown syntax for the other options, and because we create Word documents by converting a markdown table to .docx via the Pandoc software.\n\n\n\nAn object of class tt representing the table.\n\n\n\nWhen rendering Quarto and Rmarkdown documents, tinytable will populate the LaTeX preamble automatically with all the required packages. For standalone LaTeX packages, these commands should be inserted in the preamble:\n\n\\usepackage{tabularray}\n\\usepackage{float}\n\\usepackage{graphicx}\n\\usepackage{codehigh}\n\\usepackage[normalem]{ulem}\n\\UseTblrLibrary{booktabs}\n\\newcommand{\\tinytableTabularrayUnderline}[1]{\\underline{#1}}\n\\newcommand{\\tinytableTabularrayStrikeout}[1]{\\sout{#1}}\n\\NewTableCommand{\\tinytableDefineColor}[3]{\\definecolor{#1}{#2}{#3}}\n\n\n\n\n\n\nlibrary(tinytable)\n\nlibrary(tinytable)\nx <- mtcars[1:5, 1:5]\ntab <- tt(x)\ntab <- style_tt(tab, j = 1:5, align = \"lcccr\")\ntab <- style_tt(tab, i = 2:3, background = \"black\", color = \"orange\", bold = TRUE)\ntab\n\n \n\n \n \n \n tinytable_cj51823z3xb57onp8spx\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n 18.7\n 8\n 360\n 175\n 3.15", "crumbs": [ "Tutorial (HTML)", "Functions", @@ -283,7 +283,7 @@ "href": "vignettes/tutorial.html#themes", "title": "tinytable", "section": "Themes", - "text": "Themes\ntinytable offers a few basic themes out of the box: “default”, “striped”, “bootstrap”, “grid”, “void.” Those themes can be applied with the theme argument of the tt() function. As we will see below, it is easy to go much beyond those basic settings to customize your own tables. Here we only illustrate a few of the simplest settings:\n\ntt(x, theme = \"striped\")\n\n \n\n \n \n \n tinytable_4hc8wcuxw7fsvb3vdffv\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\n\ntt(x, theme = \"grid\")\n\n \n\n \n \n \n tinytable_fer6z07nkj70e6v6q10p\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\n\ntt(x, theme = \"bootstrap\")\n\n \n\n \n \n \n tinytable_uefi1imetl9e2jimixfs\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", + "text": "Themes\ntinytable offers a few basic themes out of the box: “default”, “striped”, “bootstrap”, “grid”, “void.” Those themes can be applied with the theme argument of the tt() function. As we will see below, it is easy to go much beyond those basic settings to customize your own tables. Here we only illustrate a few of the simplest settings:\n\ntt(x, theme = \"striped\")\n\n \n\n \n \n \n tinytable_0h0y3b3f1cvkscb545xo\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\n\ntt(x, theme = \"grid\")\n\n \n\n \n \n \n tinytable_lbmebzvbmcqx6m5lvf8x\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\n\ntt(x, theme = \"bootstrap\")\n\n \n\n \n \n \n tinytable_w0id5kwcdri30cdwiqe9\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", "crumbs": [ "Tutorial (HTML)" ] @@ -293,7 +293,7 @@ "href": "vignettes/tutorial.html#width", "title": "tinytable", "section": "Width", - "text": "Width\nThe width arguments accepts a number between 0 and 1, indicating what proportion of the linewidth the table should cover:\n\ntt(x, width = 0.5)\n\n \n\n \n \n \n tinytable_ztz8qv89m5g951264xqn\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\n\ntt(x, width = 1)\n\n \n\n \n \n \n tinytable_sqjsibk9d9knnwg93cay\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", + "text": "Width\nThe width arguments accepts a number between 0 and 1, indicating what proportion of the linewidth the table should cover:\n\ntt(x, width = 0.5)\n\n \n\n \n \n \n tinytable_23ghv1u22uxyhogo3flk\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\n\ntt(x, width = 1)\n\n \n\n \n \n \n tinytable_lpupc2cmznwuzl3c9gxg\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", "crumbs": [ "Tutorial (HTML)" ] @@ -303,7 +303,7 @@ "href": "vignettes/tutorial.html#captions-and-cross-references", "title": "tinytable", "section": "Captions and cross-references", - "text": "Captions and cross-references\nIn Quarto, one can specify captions and use cross-references using code like this:\n@tbl-blah shows that...\n\n```{r}\n#| label: tbl-blah\n#| tbl-cap: \"Blah blah blah\"\nlibrary(tinytable)\ntt(mtcars[1:4, 1:4])\n```\nAnd here is the rendered version of the code chunk above:\nTable 1 shows that…\n\nlibrary(tinytable)\ntt(mtcars[1:4, 1:4], placement = NULL)\n\n\n\nTable 1: Blah blah blah\n\n\n\n \n\n \n \n \n tinytable_zeuc6gf8nrq06ku4f7qo\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n \n \n \n \n \n 21\n 6\n 160\n 110\n \n \n 21\n 6\n 160\n 110\n \n \n 22.8\n 4\n 108\n 93\n \n \n 21.4\n 6\n 258\n 110\n \n \n \n \n\n \n\n \n\n\n\n\n\n\n\nFor standalone LaTeX tables, you can use the caption argument like so:\n\ntt(x, caption = \"Blah blah.\\\\label{tbl-blah}\")\n\nBe aware that this more approach may not work well in Quarto or Rmarkdown documents.", + "text": "Captions and cross-references\nIn Quarto, one can specify captions and use cross-references using code like this:\n@tbl-blah shows that...\n\n```{r}\n#| label: tbl-blah\n#| tbl-cap: \"Blah blah blah\"\nlibrary(tinytable)\ntt(mtcars[1:4, 1:4])\n```\nAnd here is the rendered version of the code chunk above:\nTable 1 shows that…\n\nlibrary(tinytable)\ntt(mtcars[1:4, 1:4], placement = NULL)\n\n\n\nTable 1: Blah blah blah\n\n\n\n \n\n \n \n \n tinytable_oxbqk25l77ibsxuggwys\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n \n \n \n \n \n 21\n 6\n 160\n 110\n \n \n 21\n 6\n 160\n 110\n \n \n 22.8\n 4\n 108\n 93\n \n \n 21.4\n 6\n 258\n 110\n \n \n \n \n\n \n\n \n\n\n\n\n\n\n\nFor standalone LaTeX tables, you can use the caption argument like so:\n\ntt(x, caption = \"Blah blah.\\\\label{tbl-blah}\")\n\nBe aware that this more approach may not work well in Quarto or Rmarkdown documents.", "crumbs": [ "Tutorial (HTML)" ] @@ -313,7 +313,7 @@ "href": "vignettes/tutorial.html#footnotes", "title": "tinytable", "section": "Footnotes", - "text": "Footnotes\nThe notes argument accepts single strings or named lists of strings:\n\nn <- \"Fusce id ipsum consequat ante pellentesque iaculis eu a ipsum. Mauris id ex in nulla consectetur aliquam. In nec tempus diam. Aliquam arcu nibh, dapibus id ex vestibulum, feugiat consequat erat. Morbi feugiat dapibus malesuada. Quisque vel ullamcorper felis. Aenean a sem at nisi tempor pretium sit amet quis lacus.\"\n\nlorem <- data.frame(\n 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.\",\n Ipsum = \" Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos.\"\n)\n\ntt(lorem, width = 3/4)\n\n \n\n \n \n \n tinytable_11pv4gn9pph5cyiyo14x\n \n \n \n \n \n\n \n \n \n \n \n \n Lorem\n Ipsum\n \n \n \n \n \n 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.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos.\n \n \n \n \n\n \n\n \n\n\n\ntt(lorem, notes = n, width = 1)\n\n \n\n \n \n \n tinytable_c6rn6k9z26oy1291zqg2\n \n \n \n \n \n\n \n \n \n \n \n \n Lorem\n Ipsum\n \n \n Fusce id ipsum consequat ante pellentesque iaculis eu a ipsum. Mauris id ex in nulla consectetur aliquam. In nec tempus diam. Aliquam arcu nibh, dapibus id ex vestibulum, feugiat consequat erat. Morbi feugiat dapibus malesuada. Quisque vel ullamcorper felis. Aenean a sem at nisi tempor pretium sit amet quis lacus.\n \n \n 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.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos.\n \n \n \n \n\n \n\n \n\n\n\nA full-width table with wrapped text in cells and a footnote.\n\nWhen notes is a named list, the names are used as identifiers and displayed as superscripts:\n\ntt(x, notes = list(a = \"Blah.\", b = \"Blah blah.\"))\n\n \n\n \n \n \n tinytable_q3fe77hyl0qzn9wrjsai\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n a Blah.\nb Blah blah.\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWe can also add markers in individual cells by providing coordinates:\n\ntt(x, notes = list(\n a = list(i = 0:1, j = 1, text = \"Blah.\"),\n b = \"Blah blah.\"\n )\n)\n\n \n\n \n \n \n tinytable_y0sxepr88rxgbt98qayq\n \n \n \n \n \n\n \n \n \n \n \n \n mpga\n cyl\n disp\n hp\n drat\n \n \n a Blah.\nb Blah blah.\n \n \n 21a\n 6\n 160\n 110\n 3.90\n \n \n 21\n 6\n 160\n 110\n 3.90\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", + "text": "Footnotes\nThe notes argument accepts single strings or named lists of strings:\n\nn <- \"Fusce id ipsum consequat ante pellentesque iaculis eu a ipsum. Mauris id ex in nulla consectetur aliquam. In nec tempus diam. Aliquam arcu nibh, dapibus id ex vestibulum, feugiat consequat erat. Morbi feugiat dapibus malesuada. Quisque vel ullamcorper felis. Aenean a sem at nisi tempor pretium sit amet quis lacus.\"\n\nlorem <- data.frame(\n 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.\",\n Ipsum = \" Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos.\"\n)\n\ntt(lorem, width = 3/4)\n\n \n\n \n \n \n tinytable_ks3k1c39kj7dksjlow3w\n \n \n \n \n \n\n \n \n \n \n \n \n Lorem\n Ipsum\n \n \n \n \n \n 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.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos.\n \n \n \n \n\n \n\n \n\n\n\ntt(lorem, notes = n, width = 1)\n\n \n\n \n \n \n tinytable_iidyu68zo1lekv32yog6\n \n \n \n \n \n\n \n \n \n \n \n \n Lorem\n Ipsum\n \n \n Fusce id ipsum consequat ante pellentesque iaculis eu a ipsum. Mauris id ex in nulla consectetur aliquam. In nec tempus diam. Aliquam arcu nibh, dapibus id ex vestibulum, feugiat consequat erat. Morbi feugiat dapibus malesuada. Quisque vel ullamcorper felis. Aenean a sem at nisi tempor pretium sit amet quis lacus.\n \n \n 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.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos.\n \n \n \n \n\n \n\n \n\n\n\nA full-width table with wrapped text in cells and a footnote.\n\nWhen notes is a named list, the names are used as identifiers and displayed as superscripts:\n\ntt(x, notes = list(a = \"Blah.\", b = \"Blah blah.\"))\n\n \n\n \n \n \n tinytable_szby25cex4v5do5xjuxc\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n a Blah.\nb Blah blah.\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWe can also add markers in individual cells by providing coordinates:\n\ntt(x, notes = list(\n a = list(i = 0:1, j = 1, text = \"Blah.\"),\n b = \"Blah blah.\"\n )\n)\n\n \n\n \n \n \n tinytable_07m40sx9u988l3z3ze4t\n \n \n \n \n \n\n \n \n \n \n \n \n mpga\n cyl\n disp\n hp\n drat\n \n \n a Blah.\nb Blah blah.\n \n \n 21a\n 6\n 160\n 110\n 3.90\n \n \n 21\n 6\n 160\n 110\n 3.90\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", "crumbs": [ "Tutorial (HTML)" ] @@ -323,7 +323,7 @@ "href": "vignettes/tutorial.html#line-breaks-and-text-wrapping", "title": "tinytable", "section": "Line breaks and text wrapping", - "text": "Line breaks and text wrapping\nWhen the width argument is specified and a cell includes long text, the text is automatically wrapped to match the table.\n\ntt(lorem, width = 3/4)\n\n \n\n \n \n \n tinytable_3bkeqbft3pux74zc9dxe\n \n \n \n \n \n\n \n \n A full width table with wrapped text.\n \n \n \n Lorem\n Ipsum\n \n \n \n \n \n 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.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos.\n \n \n \n \n\n \n\n \n\n\n\n\nManual line breaks work sligthly different in LaTeX (PDF) or HTML. This table shows the two strategies. For HTML, we insert a <br> tag. For LaTeX, we wrap the string in curly braces {}, and then insert two (escaped) backslashes: \\\\\\\\\n\nd <- data.frame(\n \"{Sed ut \\\\\\\\ perspiciatis unde}\",\n \"dicta sunt<br> explicabo. Nemo\"\n) |> setNames(c(\"LaTeX line break\", \"HTML line break\"))\ntt(d, width = 1)\n\n \n\n \n \n \n tinytable_amwjk9ey8fdu84fagzet\n \n \n \n \n \n\n \n \n \n \n \n \n LaTeX line break\n HTML line break\n \n \n \n \n \n {Sed ut \\\\ perspiciatis unde}\n dicta sunt explicabo. Nemo", + "text": "Line breaks and text wrapping\nWhen the width argument is specified and a cell includes long text, the text is automatically wrapped to match the table.\n\ntt(lorem, width = 3/4)\n\n \n\n \n \n \n tinytable_a93sqo9i271gv2bhfx07\n \n \n \n \n \n\n \n \n A full width table with wrapped text.\n \n \n \n Lorem\n Ipsum\n \n \n \n \n \n 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.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos.\n \n \n \n \n\n \n\n \n\n\n\n\nManual line breaks work sligthly different in LaTeX (PDF) or HTML. This table shows the two strategies. For HTML, we insert a <br> tag. For LaTeX, we wrap the string in curly braces {}, and then insert two (escaped) backslashes: \\\\\\\\\n\nd <- data.frame(\n \"{Sed ut \\\\\\\\ perspiciatis unde}\",\n \"dicta sunt<br> explicabo. Nemo\"\n) |> setNames(c(\"LaTeX line break\", \"HTML line break\"))\ntt(d, width = 1)\n\n \n\n \n \n \n tinytable_2hjfa25p07r23ziyer4t\n \n \n \n \n \n\n \n \n \n \n \n \n LaTeX line break\n HTML line break\n \n \n \n \n \n {Sed ut \\\\ perspiciatis unde}\n dicta sunt explicabo. Nemo", "crumbs": [ "Tutorial (HTML)" ] @@ -333,7 +333,7 @@ "href": "vignettes/tutorial.html#math", "title": "tinytable", "section": "Math", - "text": "Math\nTo insert LaTeX-style mathematical expressions in a tinytable, we enclose the expression in dollar signs: $...$. The expression will then rendered as a mathematical expression by MathJax (for HTML), LaTeX, or Pandoc. Do not forget to double escape any backslashes.\n\ndat <- data.frame(Math = c(\n \"$x^2 + y^2 = z^2$\",\n \"$\\\\frac{1}{2}$\"\n))\ntt(dat) |> style_tt(j = 1, align = \"c\")\n\n \n\n \n \n \n tinytable_co1htnew3aao85tygxqk\n \n \n \n \n \n\n \n \n \n \n \n \n Math\n \n \n \n \n \n $x^2 + y^2 = z^2$\n \n \n $\\frac{1}{2}$", + "text": "Math\nTo insert LaTeX-style mathematical expressions in a tinytable, we enclose the expression in dollar signs: $...$. The expression will then rendered as a mathematical expression by MathJax (for HTML), LaTeX, or Pandoc. Do not forget to double escape any backslashes.\n\ndat <- data.frame(Math = c(\n \"$x^2 + y^2 = z^2$\",\n \"$\\\\frac{1}{2}$\"\n))\ntt(dat) |> style_tt(j = 1, align = \"c\")\n\n \n\n \n \n \n tinytable_g2tmnwal1dtkpp3na7sl\n \n \n \n \n \n\n \n \n \n \n \n \n Math\n \n \n \n \n \n $x^2 + y^2 = z^2$\n \n \n $\\frac{1}{2}$", "crumbs": [ "Tutorial (HTML)" ] @@ -343,7 +343,7 @@ "href": "vignettes/tutorial.html#line-breaks-and-text-wrapping-1", "title": "tinytable", "section": "Line breaks and text wrapping", - "text": "Line breaks and text wrapping\nWhen the width argument is specified and a cell includes long text, the text is automatically wrapped to match the table.\n\ntt(lorem, width = 3/4)\n\n \n\n \n \n \n tinytable_ykkbl3yevwa0e8jbys11\n \n \n \n \n \n\n \n \n A full width table with wrapped text.\n \n \n \n Lorem\n Ipsum\n \n \n \n \n \n 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.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos.\n \n \n \n \n\n \n\n \n\n\n\n\nManual line breaks work sligthly different in LaTeX (PDF) or HTML. This table shows the two strategies. For HTML, we insert a <br> tag. For LaTeX, we wrap the string in curly braces {}, and then insert two (escaped) backslashes: \\\\\\\\\n\nd <- data.frame(\n \"{Sed ut \\\\\\\\ perspiciatis unde}\",\n \"dicta sunt<br> explicabo. Nemo\"\n) |> setNames(c(\"LaTeX line break\", \"HTML line break\"))\ntt(d, width = 1)\n\n \n\n \n \n \n tinytable_a7mfkpk70ebgbttw4bg2\n \n \n \n \n \n\n \n \n \n \n \n \n LaTeX line break\n HTML line break\n \n \n \n \n \n {Sed ut \\\\ perspiciatis unde}\n dicta sunt explicabo. Nemo", + "text": "Line breaks and text wrapping\nWhen the width argument is specified and a cell includes long text, the text is automatically wrapped to match the table.\n\ntt(lorem, width = 3/4)\n\n \n\n \n \n \n tinytable_vjggcrojz2jazdbdvwb3\n \n \n \n \n \n\n \n \n A full width table with wrapped text.\n \n \n \n Lorem\n Ipsum\n \n \n \n \n \n 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.\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos.\n \n \n \n \n\n \n\n \n\n\n\n\nManual line breaks work sligthly different in LaTeX (PDF) or HTML. This table shows the two strategies. For HTML, we insert a <br> tag. For LaTeX, we wrap the string in curly braces {}, and then insert two (escaped) backslashes: \\\\\\\\\n\nd <- data.frame(\n \"{Sed ut \\\\\\\\ perspiciatis unde}\",\n \"dicta sunt<br> explicabo. Nemo\"\n) |> setNames(c(\"LaTeX line break\", \"HTML line break\"))\ntt(d, width = 1)\n\n \n\n \n \n \n tinytable_md2m8eeoi1e8g6x4cqjy\n \n \n \n \n \n\n \n \n \n \n \n \n LaTeX line break\n HTML line break\n \n \n \n \n \n {Sed ut \\\\ perspiciatis unde}\n dicta sunt explicabo. Nemo", "crumbs": [ "Tutorial (HTML)" ] @@ -353,7 +353,7 @@ "href": "vignettes/tutorial.html#numbers-dates-strings-etc.", "title": "tinytable", "section": "Numbers, dates, strings, etc.", - "text": "Numbers, dates, strings, etc.\nThe tt() function is minimalist; it’s inteded purpose is simply to draw nice tables. Users who want to format numbers, dates, strings, and other variables in different ways should process their data before supplying it to the tt() table-drawing function. To do so, we can use the format_tt() function supplied by the tinytable.\nIn a very simple case—such as printing 2 significant digits of all numeric variables—we can use the digits argument of tt():\n\ndat <- data.frame(\n w = c(143002.2092, 201399.181, 100188.3883),\n x = c(1.43402, 201.399, 0.134588),\n y = as.Date(sample(1:1000, 3)),\n z = c(TRUE, TRUE, FALSE))\n\ntt(dat, digits = 2)\n\n \n\n \n \n \n tinytable_dl86i8f4cs8cqkwx1ob8\n \n \n \n \n \n\n \n \n \n \n \n \n w\n x\n y\n z\n \n \n \n \n \n 143002\n 1.43\n 1970-06-25\n True\n \n \n 201399\n 201.40\n 1970-03-12\n True\n \n \n 100188\n 0.13\n 1971-03-03\n False\n \n \n \n \n\n \n\n \n\n\n\n\nWe can get more fine-grained control over formatting by calling format_tt() after tt(), optionally by specifying the columns to format with j:\n\ntt(dat) |>\n format_tt(\n j = 2:4,\n digits = 1,\n date = \"%B %d %Y\") |>\n format_tt(\n j = 1,\n digits = 2,\n num_mark_big = \" \",\n num_mark_dec = \",\",\n num_fmt = \"decimal\")\n\n \n\n \n \n \n tinytable_2d9ebpwysg3817ko6syu\n \n \n \n \n \n\n \n \n \n \n \n \n w\n x\n y\n z\n \n \n \n \n \n 143 002,21\n 1.4\n June 25 1970\n True\n \n \n 201 399,18\n 201.4\n March 12 1970\n True\n \n \n 100 188,39\n 0.1\n March 03 1971\n False\n \n \n \n \n\n \n\n \n\n\n\n\nWe can use a regular expression in j to select columns, and the ?sprintf function to format strings, numbers, and to do string interpolation (similar to the glue package, but using Base R):\n\ndat <- data.frame(\n a = c(\"Burger\", \"Halloumi\", \"Tofu\", \"Beans\"),\n b = c(1.43202, 201.399, 0.146188, 0.0031),\n c = c(98938272783457, 7288839482, 29111727, 93945))\ntt(dat) |>\n format_tt(j = \"a\", sprintf = \"Food: %s\") |>\n format_tt(j = 2, digits = 1) |>\n format_tt(j = \"c\", digits = 2, num_suffix = TRUE)\n\n \n\n \n \n \n tinytable_ec7u48k51nggij2pp29s\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n c\n \n \n \n \n \n Food: Burger\n 1.432\n 98.94T\n \n \n Food: Halloumi\n 201.399\n 7.29B\n \n \n Food: Tofu\n 0.146\n 29.11M\n \n \n Food: Beans\n 0.003\n 93.94K\n \n \n \n \n\n \n\n \n\n\n\n\nFinally, if you like the format_tt() interface, you can use it directly with numbers, vectors, or data frames:\n\nformat_tt(pi, digits = 1)\n\n[1] \"3\"\n\nformat_tt(dat, digits = 1, num_suffix = TRUE)\n\n a b c\n1 Burger 1.4 98.9T\n2 Halloumi 201.4 7.3B\n3 Tofu 0.1 29.1M\n4 Beans 0.0 93.9K", + "text": "Numbers, dates, strings, etc.\nThe tt() function is minimalist; it’s inteded purpose is simply to draw nice tables. Users who want to format numbers, dates, strings, and other variables in different ways should process their data before supplying it to the tt() table-drawing function. To do so, we can use the format_tt() function supplied by the tinytable.\nIn a very simple case—such as printing 2 significant digits of all numeric variables—we can use the digits argument of tt():\n\ndat <- data.frame(\n w = c(143002.2092, 201399.181, 100188.3883),\n x = c(1.43402, 201.399, 0.134588),\n y = as.Date(sample(1:1000, 3)),\n z = c(TRUE, TRUE, FALSE))\n\ntt(dat, digits = 2)\n\n \n\n \n \n \n tinytable_ertxhm1bvnivge24b44u\n \n \n \n \n \n\n \n \n \n \n \n \n w\n x\n y\n z\n \n \n \n \n \n 143002\n 1.43\n 1972-01-31\n True\n \n \n 201399\n 201.40\n 1971-01-01\n True\n \n \n 100188\n 0.13\n 1970-08-24\n False\n \n \n \n \n\n \n\n \n\n\n\n\nWe can get more fine-grained control over formatting by calling format_tt() after tt(), optionally by specifying the columns to format with j:\n\ntt(dat) |>\n format_tt(\n j = 2:4,\n digits = 1,\n date = \"%B %d %Y\") |>\n format_tt(\n j = 1,\n digits = 2,\n num_mark_big = \" \",\n num_mark_dec = \",\",\n num_fmt = \"decimal\")\n\n \n\n \n \n \n tinytable_jv02rtzojb8wc7he1knp\n \n \n \n \n \n\n \n \n \n \n \n \n w\n x\n y\n z\n \n \n \n \n \n 143 002,21\n 1.4\n January 31 1972\n True\n \n \n 201 399,18\n 201.4\n January 01 1971\n True\n \n \n 100 188,39\n 0.1\n August 24 1970\n False\n \n \n \n \n\n \n\n \n\n\n\n\nWe can use a regular expression in j to select columns, and the ?sprintf function to format strings, numbers, and to do string interpolation (similar to the glue package, but using Base R):\n\ndat <- data.frame(\n a = c(\"Burger\", \"Halloumi\", \"Tofu\", \"Beans\"),\n b = c(1.43202, 201.399, 0.146188, 0.0031),\n c = c(98938272783457, 7288839482, 29111727, 93945))\ntt(dat) |>\n format_tt(j = \"a\", sprintf = \"Food: %s\") |>\n format_tt(j = 2, digits = 1) |>\n format_tt(j = \"c\", digits = 2, num_suffix = TRUE)\n\n \n\n \n \n \n tinytable_viwr260tnohm5t7g95hg\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n c\n \n \n \n \n \n Food: Burger\n 1.432\n 98.94T\n \n \n Food: Halloumi\n 201.399\n 7.29B\n \n \n Food: Tofu\n 0.146\n 29.11M\n \n \n Food: Beans\n 0.003\n 93.94K\n \n \n \n \n\n \n\n \n\n\n\n\nFinally, if you like the format_tt() interface, you can use it directly with numbers, vectors, or data frames:\n\nformat_tt(pi, digits = 1)\n\n[1] \"3\"\n\nformat_tt(dat, digits = 1, num_suffix = TRUE)\n\n a b c\n1 Burger 1.4 98.9T\n2 Halloumi 201.4 7.3B\n3 Tofu 0.1 29.1M\n4 Beans 0.0 93.9K", "crumbs": [ "Tutorial (HTML)" ] @@ -363,7 +363,7 @@ "href": "vignettes/tutorial.html#markdown", "title": "tinytable", "section": "Markdown", - "text": "Markdown\nMarkdown can be rendered in cells by using the markdown argument of the format_tt() function (note: this requires installing the markdown as an optional dependency).\n\ndat <- data.frame( markdown = c(\n \"This is _italic_ text.\",\n \"This sentence ends with a superscript.^2^\")\n)\n\ntt(dat) |>\n format_tt(j = 1, markdown = TRUE) |>\n style_tt(j = 1, align = \"c\")\n\n \n\n \n \n \n tinytable_9rtuwpa3iu0cvxqwyy1t\n \n \n \n \n \n\n \n \n \n \n \n \n markdown\n \n \n \n \n \n This is italic text.\n \n \n This sentence ends with a superscript.2\n \n \n \n \n\n \n\n \n\n\n\n\nMarkdown syntax can be particularly useful when formatting URLs in a table:\n\ndat <- data.frame(\n `Package (link)` = c(\n \"[`marginaleffects`](https://www.marginaleffects.com/)\",\n \"[`modelsummary`](https://www.modelsummary.com/)\",\n \"[`tinytable`](https://vincentarelbundock.github.io/tinytable/)\",\n \"[`countrycode`](https://vincentarelbundock.github.io/countrycode/)\",\n \"[`WDI`](https://vincentarelbundock.github.io/WDI/)\",\n \"[`softbib`](https://vincentarelbundock.github.io/softbib/)\",\n \"[`tinysnapshot`](https://vincentarelbundock.github.io/tinysnapshot/)\",\n \"[`altdoc`](https://etiennebacher.github.io/altdoc/)\",\n \"[`plot2`](https://grantmcdermott.com/plot2/)\",\n \"[`parameters`](https://easystats.github.io/parameters/)\",\n \"[`insight`](https://easystats.github.io/insight/)\"\n ),\n Purpose = c(\n \"Interpreting statistical models\",\n \"Data and model summaries\",\n \"Draw beautiful tables easily\",\n \"Convert country codes and names\",\n \"Download data from the World Bank\",\n \"Software bibliographies in R\",\n \"Snapshots for unit tests using `tinytest`\",\n \"Create documentation website for R packages\",\n \"Extension of base R plot functions\",\n \"Extract from model objects\",\n \"Extract information from model objects\"\n ),\n check.names = FALSE\n)\n\ntt(dat) |> format_tt(j = 1, markdown = TRUE)\n\n \n\n \n \n \n tinytable_g4hudqa0aible8shrn4z\n \n \n \n \n \n\n \n \n Vincent sometimes contributes to these R packages.\n \n \n \n Package (link)\n Purpose\n \n \n \n \n \n marginaleffects\n Interpreting statistical models\n \n \n modelsummary\n Data and model summaries\n \n \n tinytable\n Draw beautiful tables easily\n \n \n countrycode\n Convert country codes and names\n \n \n WDI\n Download data from the World Bank\n \n \n softbib\n Software bibliographies in R\n \n \n tinysnapshot\n Snapshots for unit tests using `tinytest`\n \n \n altdoc\n Create documentation website for R packages\n \n \n plot2\n Extension of base R plot functions\n \n \n parameters\n Extract from model objects\n \n \n insight\n Extract information from model objects", + "text": "Markdown\nMarkdown can be rendered in cells by using the markdown argument of the format_tt() function (note: this requires installing the markdown as an optional dependency).\n\ndat <- data.frame( markdown = c(\n \"This is _italic_ text.\",\n \"This sentence ends with a superscript.^2^\")\n)\n\ntt(dat) |>\n format_tt(j = 1, markdown = TRUE) |>\n style_tt(j = 1, align = \"c\")\n\n \n\n \n \n \n tinytable_41z2od4xtdleqbyq1yy2\n \n \n \n \n \n\n \n \n \n \n \n \n markdown\n \n \n \n \n \n This is italic text.\n \n \n This sentence ends with a superscript.2\n \n \n \n \n\n \n\n \n\n\n\n\nMarkdown syntax can be particularly useful when formatting URLs in a table:\n\ndat <- data.frame(\n `Package (link)` = c(\n \"[`marginaleffects`](https://www.marginaleffects.com/)\",\n \"[`modelsummary`](https://www.modelsummary.com/)\",\n \"[`tinytable`](https://vincentarelbundock.github.io/tinytable/)\",\n \"[`countrycode`](https://vincentarelbundock.github.io/countrycode/)\",\n \"[`WDI`](https://vincentarelbundock.github.io/WDI/)\",\n \"[`softbib`](https://vincentarelbundock.github.io/softbib/)\",\n \"[`tinysnapshot`](https://vincentarelbundock.github.io/tinysnapshot/)\",\n \"[`altdoc`](https://etiennebacher.github.io/altdoc/)\",\n \"[`plot2`](https://grantmcdermott.com/plot2/)\",\n \"[`parameters`](https://easystats.github.io/parameters/)\",\n \"[`insight`](https://easystats.github.io/insight/)\"\n ),\n Purpose = c(\n \"Interpreting statistical models\",\n \"Data and model summaries\",\n \"Draw beautiful tables easily\",\n \"Convert country codes and names\",\n \"Download data from the World Bank\",\n \"Software bibliographies in R\",\n \"Snapshots for unit tests using `tinytest`\",\n \"Create documentation website for R packages\",\n \"Extension of base R plot functions\",\n \"Extract from model objects\",\n \"Extract information from model objects\"\n ),\n check.names = FALSE\n)\n\ntt(dat) |> format_tt(j = 1, markdown = TRUE)\n\n \n\n \n \n \n tinytable_s6c752b65p4gobrmv87q\n \n \n \n \n \n\n \n \n Vincent sometimes contributes to these R packages.\n \n \n \n Package (link)\n Purpose\n \n \n \n \n \n marginaleffects\n Interpreting statistical models\n \n \n modelsummary\n Data and model summaries\n \n \n tinytable\n Draw beautiful tables easily\n \n \n countrycode\n Convert country codes and names\n \n \n WDI\n Download data from the World Bank\n \n \n softbib\n Software bibliographies in R\n \n \n tinysnapshot\n Snapshots for unit tests using `tinytest`\n \n \n altdoc\n Create documentation website for R packages\n \n \n plot2\n Extension of base R plot functions\n \n \n parameters\n Extract from model objects\n \n \n insight\n Extract information from model objects", "crumbs": [ "Tutorial (HTML)" ] @@ -373,7 +373,7 @@ "href": "vignettes/tutorial.html#cells-rows-columns", "title": "tinytable", "section": "Cells, rows, columns", - "text": "Cells, rows, columns\nTo style individual cells, we use the style_cell() function. The first two arguments—i and j—identify the cells of interest, by row and column numbers respectively. To style a cell in the 2nd row and 3rd column, we can do:\n\ntt(x) |>\n style_tt(\n i = 2,\n j = 3,\n background = \"black\",\n color = \"white\")\n\n \n\n \n \n \n tinytable_kkzecrr1x0thg5dxtqd6\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nThe i and j accept vectors of integers to modify several cells at once:\n\ntt(x) |>\n style_tt(\n i = 2:3,\n j = c(1, 3, 4),\n italic = TRUE,\n color = \"orange\")\n\n \n\n \n \n \n tinytable_9tqh17ilwf2e2chc9drc\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWe can style all cells in a table by omitting both the i and j arguments:\n\ntt(x) |> style_tt(color = \"orange\")\n\n \n\n \n \n \n tinytable_e1vwm64e62y4admhqzdf\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWe can style entire rows by omitting the j argument:\n\ntt(x) |> style_tt(i = 1:2, color = \"orange\")\n\n \n\n \n \n \n tinytable_2thutaki28pcu8gahjgn\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWe can style entire columns by omitting the i argument:\n\ntt(x) |> style_tt(j = c(2, 4), bold = TRUE)\n\n \n\n \n \n \n tinytable_iqfv3z20yi7jkn07m6f5\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nThe j argument accepts integer vectors, but also a string with a Perl-style regular expression, which makes it easier to select columns by name:\n\ntt(x) |> style_tt(j = \"mpg|drat\", color = \"orange\")\n\n \n\n \n \n \n tinytable_r64o4u3r2mfmz9j5qe5b\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nOf course, we can also call the style_tt() function several times to apply different styles to different parts of the table:\n\ntt(x) |> \n style_tt(i = 1, j = 1:2, color = \"orange\") |>\n style_tt(i = 1, j = 3:4, color = \"green\")\n\n \n\n \n \n \n tinytable_6sjkxs5zdq8tegn1xyij\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", + "text": "Cells, rows, columns\nTo style individual cells, we use the style_cell() function. The first two arguments—i and j—identify the cells of interest, by row and column numbers respectively. To style a cell in the 2nd row and 3rd column, we can do:\n\ntt(x) |>\n style_tt(\n i = 2,\n j = 3,\n background = \"black\",\n color = \"white\")\n\n \n\n \n \n \n tinytable_fpsq8evtemom6d8hlcz0\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nThe i and j accept vectors of integers to modify several cells at once:\n\ntt(x) |>\n style_tt(\n i = 2:3,\n j = c(1, 3, 4),\n italic = TRUE,\n color = \"orange\")\n\n \n\n \n \n \n tinytable_xfirs2a8ji49buon27kl\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWe can style all cells in a table by omitting both the i and j arguments:\n\ntt(x) |> style_tt(color = \"orange\")\n\n \n\n \n \n \n tinytable_v8mopbxinco77hlxqyo8\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWe can style entire rows by omitting the j argument:\n\ntt(x) |> style_tt(i = 1:2, color = \"orange\")\n\n \n\n \n \n \n tinytable_5v906pmuvp43422y6k5q\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWe can style entire columns by omitting the i argument:\n\ntt(x) |> style_tt(j = c(2, 4), bold = TRUE)\n\n \n\n \n \n \n tinytable_006zpkudse7nnyo7vtdx\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nThe j argument accepts integer vectors, but also a string with a Perl-style regular expression, which makes it easier to select columns by name:\n\ntt(x) |> style_tt(j = \"mpg|drat\", color = \"orange\")\n\n \n\n \n \n \n tinytable_iurmfcdsjr5drfgxcmmm\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nOf course, we can also call the style_tt() function several times to apply different styles to different parts of the table:\n\ntt(x) |> \n style_tt(i = 1, j = 1:2, color = \"orange\") |>\n style_tt(i = 1, j = 3:4, color = \"green\")\n\n \n\n \n \n \n tinytable_lbnt88eos8pdkf5mh85q\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", "crumbs": [ "Tutorial (HTML)" ] @@ -383,7 +383,7 @@ "href": "vignettes/tutorial.html#colors", "title": "tinytable", "section": "Colors", - "text": "Colors\nThe color and background arguments in the style_tt() function are used for specifying the text color and the background color for cells of a table created by the tt() function. This argument plays a crucial role in enhancing the visual appeal and readability of the table, whether it’s rendered in LaTeX or HTML format. The way we specify colors differs slightly between the two formats:\nFor HTML Output:\n\nHex Codes: You can specify colors using hexadecimal codes, which consist of a # followed by 6 characters (e.g., #CC79A7). This allows for a wide range of colors.\nKeywords: There’s also the option to use color keywords for convenience. The supported keywords are basic color names like black, red, blue, etc.\n\nFor LaTeX Output:\n\nHexadecimal Codes: Similar to HTML, you can use hexadecimal codes. However, in LaTeX, you need to include these codes as strings (e.g., \"#CC79A7\").\nKeywords: LaTeX supports a different set of color keywords, which include standard colors like black, red, blue, as well as additional ones like cyan, darkgray, lightgray, etc.\nColor Blending: An advanced feature in LaTeX is color blending, which can be achieved using the xcolor package. You can blend colors by specifying ratios (e.g., white!80!blue or green!20!red).\nLuminance Levels: The ninecolors package in LaTeX offers colors with predefined luminance levels, allowing for more nuanced color choices (e.g., “azure4”, “magenta8”).\n\nNote that the keywords used in LaTeX and HTML are slightly different.\n\ntt(x) |> style_tt(i = 1:4, j = 1, color = \"#FF5733\")\n\n \n\n \n \n \n tinytable_vod72ygrb5sdkocpxoxi\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nNote that when using Hex codes in a LaTeX table, we need extra declarations in the LaTeX preamble. See ?tt for details.", + "text": "Colors\nThe color and background arguments in the style_tt() function are used for specifying the text color and the background color for cells of a table created by the tt() function. This argument plays a crucial role in enhancing the visual appeal and readability of the table, whether it’s rendered in LaTeX or HTML format. The way we specify colors differs slightly between the two formats:\nFor HTML Output:\n\nHex Codes: You can specify colors using hexadecimal codes, which consist of a # followed by 6 characters (e.g., #CC79A7). This allows for a wide range of colors.\nKeywords: There’s also the option to use color keywords for convenience. The supported keywords are basic color names like black, red, blue, etc.\n\nFor LaTeX Output:\n\nHexadecimal Codes: Similar to HTML, you can use hexadecimal codes. However, in LaTeX, you need to include these codes as strings (e.g., \"#CC79A7\").\nKeywords: LaTeX supports a different set of color keywords, which include standard colors like black, red, blue, as well as additional ones like cyan, darkgray, lightgray, etc.\nColor Blending: An advanced feature in LaTeX is color blending, which can be achieved using the xcolor package. You can blend colors by specifying ratios (e.g., white!80!blue or green!20!red).\nLuminance Levels: The ninecolors package in LaTeX offers colors with predefined luminance levels, allowing for more nuanced color choices (e.g., “azure4”, “magenta8”).\n\nNote that the keywords used in LaTeX and HTML are slightly different.\n\ntt(x) |> style_tt(i = 1:4, j = 1, color = \"#FF5733\")\n\n \n\n \n \n \n tinytable_w77m3uy6k4go1tttiyxr\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nNote that when using Hex codes in a LaTeX table, we need extra declarations in the LaTeX preamble. See ?tt for details.", "crumbs": [ "Tutorial (HTML)" ] @@ -393,7 +393,7 @@ "href": "vignettes/tutorial.html#alignment", "title": "tinytable", "section": "Alignment", - "text": "Alignment\nTo align columns, we use a single character, or a string where each letter represents a column:\n\ndat <- data.frame(\n a = c(\"a\", \"aa\", \"aaa\"),\n b = c(\"b\", \"bb\", \"bbb\"),\n c = c(\"c\", \"cc\", \"ccc\"))\n\ntt(dat) |> style_tt(j = 1:3, align = \"c\")\n\n \n\n \n \n \n tinytable_c4zns70ps50uwuydc0yx\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n c\n \n \n \n \n \n a\n b\n c\n \n \n aa\n bb\n cc\n \n \n aaa\n bbb\n ccc\n \n \n \n \n\n \n\n \n\n\n\ntt(dat) |> style_tt(j = 1:3, align = \"lcr\")\n\n \n\n \n \n \n tinytable_t0fasgk6a5hhfmnfaulp\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n c\n \n \n \n \n \n a\n b\n c\n \n \n aa\n bb\n cc\n \n \n aaa\n bbb\n ccc", + "text": "Alignment\nTo align columns, we use a single character, or a string where each letter represents a column:\n\ndat <- data.frame(\n a = c(\"a\", \"aa\", \"aaa\"),\n b = c(\"b\", \"bb\", \"bbb\"),\n c = c(\"c\", \"cc\", \"ccc\"))\n\ntt(dat) |> style_tt(j = 1:3, align = \"c\")\n\n \n\n \n \n \n tinytable_ewx6f2n13qcdavpp3dod\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n c\n \n \n \n \n \n a\n b\n c\n \n \n aa\n bb\n cc\n \n \n aaa\n bbb\n ccc\n \n \n \n \n\n \n\n \n\n\n\ntt(dat) |> style_tt(j = 1:3, align = \"lcr\")\n\n \n\n \n \n \n tinytable_zy7ibiu9ycklalcymmpj\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n c\n \n \n \n \n \n a\n b\n c\n \n \n aa\n bb\n cc\n \n \n aaa\n bbb\n ccc", "crumbs": [ "Tutorial (HTML)" ] @@ -403,7 +403,7 @@ "href": "vignettes/tutorial.html#fonts", "title": "tinytable", "section": "Fonts", - "text": "Fonts\nThe font size is specified in em units.\n\ntt(x) |> style_tt(j = \"mpg|hp|qsec\", fontsize = 1.5)\n\n \n\n \n \n \n tinytable_f7el9csj2imhtr8qh28p\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", + "text": "Fonts\nThe font size is specified in em units.\n\ntt(x) |> style_tt(j = \"mpg|hp|qsec\", fontsize = 1.5)\n\n \n\n \n \n \n tinytable_wkfdhwr7058233ep9l6h\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", "crumbs": [ "Tutorial (HTML)" ] @@ -413,7 +413,7 @@ "href": "vignettes/tutorial.html#headers", "title": "tinytable", "section": "Headers", - "text": "Headers\nThe header can be omitted from the table by deleting the column names in the x data frame:\n\nk <- x\ncolnames(k) <- NULL\ntt(k)\n\n \n\n \n \n \n tinytable_g3cmihm5v08qgoneeb1t\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nThe first is row 0, and higher level headers (ex: column spanning labels) have negative indices like -1. They can be styled as expected:\n\ntt(x) |> style_tt(i = 0, color = \"white\", background = \"black\")\n\n \n\n \n \n \n tinytable_a5vokbptovkv80gfh1nd\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWhen styling columns without specifying i, the headers are styled in accordance with the rest of the column:\n\ntt(x) |> style_tt(j = 2:3, color = \"white\", background = \"black\")\n\n \n\n \n \n \n tinytable_kldmrxt0xe5a6slwn85f\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", + "text": "Headers\nThe header can be omitted from the table by deleting the column names in the x data frame:\n\nk <- x\ncolnames(k) <- NULL\ntt(k)\n\n \n\n \n \n \n tinytable_9akelkciq9ao3626176y\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nThe first is row 0, and higher level headers (ex: column spanning labels) have negative indices like -1. They can be styled as expected:\n\ntt(x) |> style_tt(i = 0, color = \"white\", background = \"black\")\n\n \n\n \n \n \n tinytable_i9nus4wzn9acrx7khriy\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWhen styling columns without specifying i, the headers are styled in accordance with the rest of the column:\n\ntt(x) |> style_tt(j = 2:3, color = \"white\", background = \"black\")\n\n \n\n \n \n \n tinytable_mpwkx480njicw1k4tyhz\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", "crumbs": [ "Tutorial (HTML)" ] @@ -423,7 +423,7 @@ "href": "vignettes/tutorial.html#conditional-styling", "title": "tinytable", "section": "Conditional styling", - "text": "Conditional styling\nWe can use the standard which function from Base R to create indices and apply conditional stying on rows. And we can use a regular expression in j to apply conditional styling on columns:\n\nk <- mtcars[1:10, c(\"mpg\", \"am\", \"vs\")]\n\ntt(k) |> \n style_tt(\n i = which(k$am == k$vs),\n background = \"teal\",\n color = \"white\")\n\n \n\n \n \n \n tinytable_f5b8uvti7x2f2fyry9yw\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n am\n vs\n \n \n \n \n \n 21\n 1\n 0\n \n \n 21\n 1\n 0\n \n \n 22.8\n 1\n 1\n \n \n 21.4\n 0\n 1\n \n \n 18.7\n 0\n 0\n \n \n 18.1\n 0\n 1\n \n \n 14.3\n 0\n 0\n \n \n 24.4\n 0\n 1\n \n \n 22.8\n 0\n 1\n \n \n 19.2\n 0\n 1", + "text": "Conditional styling\nWe can use the standard which function from Base R to create indices and apply conditional stying on rows. And we can use a regular expression in j to apply conditional styling on columns:\n\nk <- mtcars[1:10, c(\"mpg\", \"am\", \"vs\")]\n\ntt(k) |> \n style_tt(\n i = which(k$am == k$vs),\n background = \"teal\",\n color = \"white\")\n\n \n\n \n \n \n tinytable_99jafym6jhlsmqguc83x\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n am\n vs\n \n \n \n \n \n 21\n 1\n 0\n \n \n 21\n 1\n 0\n \n \n 22.8\n 1\n 1\n \n \n 21.4\n 0\n 1\n \n \n 18.7\n 0\n 0\n \n \n 18.1\n 0\n 1\n \n \n 14.3\n 0\n 0\n \n \n 24.4\n 0\n 1\n \n \n 22.8\n 0\n 1\n \n \n 19.2\n 0\n 1", "crumbs": [ "Tutorial (HTML)" ] @@ -433,7 +433,7 @@ "href": "vignettes/tutorial.html#vectorized-styling-heatmaps", "title": "tinytable", "section": "Vectorized styling (heatmaps)", - "text": "Vectorized styling (heatmaps)\nThe color, background, and fontsize arguments are vectorized. This allows easy specification of different colors in a single call:\n\ntt(x) |>\n style_tt(\n i = 1:4,\n color = c(\"red\", \"blue\", \"green\", \"orange\"))\n\n \n\n \n \n \n tinytable_k49xddwzarke5t3ngj72\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWhen using a single value for a vectorized argument, it gets applied to all values:\n\ntt(x) |>\n style_tt(\n j = 2:3,\n color = c(\"orange\", \"green\"),\n background = \"black\")\n\n \n\n \n \n \n tinytable_axisc9ao1culi6nt24un\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWe can also produce more complex heatmap-like tables to illustrate different font sizes in em units:\n\n# font sizes\nfs <- seq(.1, 2, length.out = 20)\n\n# headless table\nk <- data.frame(matrix(fs, ncol = 5))\ncolnames(k) <- NULL\n\n# colors\nbg <- hcl.colors(20, \"Inferno\")\nfg <- ifelse(as.matrix(k) < 1.7, tail(bg, 1), head(bg, 1))\n\n# table\ntt(k, width = .7, theme = \"void\") |>\n style_tt(j = 1:5, align = \"ccccc\") |>\n style_tt(\n i = 1:4,\n j = 1:5,\n color = fg,\n background = bg,\n fontsize = fs)\n\n \n\n \n \n \n tinytable_r3rlqjt226gqeutinxo9\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n 0.1\n 0.5\n 0.9\n 1.3\n 1.7\n \n \n 0.2\n 0.6\n 1\n 1.4\n 1.8\n \n \n 0.3\n 0.7\n 1.1\n 1.5\n 1.9\n \n \n 0.4\n 0.8\n 1.2\n 1.6\n 2", + "text": "Vectorized styling (heatmaps)\nThe color, background, and fontsize arguments are vectorized. This allows easy specification of different colors in a single call:\n\ntt(x) |>\n style_tt(\n i = 1:4,\n color = c(\"red\", \"blue\", \"green\", \"orange\"))\n\n \n\n \n \n \n tinytable_urdyq2cy7gmyuurm7vaz\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWhen using a single value for a vectorized argument, it gets applied to all values:\n\ntt(x) |>\n style_tt(\n j = 2:3,\n color = c(\"orange\", \"green\"),\n background = \"black\")\n\n \n\n \n \n \n tinytable_orvtfhz58n5kvcxpogq3\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWe can also produce more complex heatmap-like tables to illustrate different font sizes in em units:\n\n# font sizes\nfs <- seq(.1, 2, length.out = 20)\n\n# headless table\nk <- data.frame(matrix(fs, ncol = 5))\ncolnames(k) <- NULL\n\n# colors\nbg <- hcl.colors(20, \"Inferno\")\nfg <- ifelse(as.matrix(k) < 1.7, tail(bg, 1), head(bg, 1))\n\n# table\ntt(k, width = .7, theme = \"void\") |>\n style_tt(j = 1:5, align = \"ccccc\") |>\n style_tt(\n i = 1:4,\n j = 1:5,\n color = fg,\n background = bg,\n fontsize = fs)\n\n \n\n \n \n \n tinytable_k96xlhe3nxahsdgi2xyf\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n 0.1\n 0.5\n 0.9\n 1.3\n 1.7\n \n \n 0.2\n 0.6\n 1\n 1.4\n 1.8\n \n \n 0.3\n 0.7\n 1.1\n 1.5\n 1.9\n \n \n 0.4\n 0.8\n 1.2\n 1.6\n 2", "crumbs": [ "Tutorial (HTML)" ] @@ -443,7 +443,7 @@ "href": "vignettes/tutorial.html#lines-borders", "title": "tinytable", "section": "Lines (borders)", - "text": "Lines (borders)\nThe style_tt function allows us to customize the borders that surround eacell of a table, as well horizontal and vertical rules. To control these lines, we use the line, line_width, and line_color arguments. Here’s a brief overview of each of these arguments:\n\nline: This argument specifies where solid lines should be drawn. It is a string that can consist of the following characters:\n\n\"t\": Draw a line at the top of the cell, row, or column.\n\"b\": Draw a line at the bottom of the cell, row, or column.\n\"l\": Draw a line at the left side of the cell, row, or column.\n\"r\": Draw a line at the right side of the cell, row, or column.\nYou can combine these characters to draw lines on multiple sides, such as \"tbl\" to draw lines at the top, bottom, and left sides of a cell.\n\nline_width: This argument controls the width of the solid lines in em units (default: 0.1 em). You can adjust this value to make the lines thicker or thinner.\nline_color: Specifies the color of the solid lines. You can use color names, hexadecimal codes, or other color specifications to define the line color.\n\nHere is an example where we draw lines around every border (“t”, “b”, “l”, and “r”) of specified cells.\n\ntt(x, theme = \"void\") |>\n style_tt(\n i = 0:3,\n j = 1:3,\n line = \"tblr\",\n line_width = 0.4,\n line_color = \"orange\")\n\n \n\n \n \n \n tinytable_zadyys92nedaoiupm405\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nAnd here is an example with horizontal rules:\n\ntt(x, theme = \"void\") |>\n style_tt(i = 0, line = \"t\", line_color = \"orange\", line_width = 0.4) |>\n style_tt(i = 0, line = \"b\", line_color = \"purple\", line_width = 0.2) |>\n style_tt(i = 4, line = \"b\", line_color = \"orange\", line_width = 0.4)\n\n \n\n \n \n \n tinytable_naqye7q7aax9y2tp3x3q\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", + "text": "Lines (borders)\nThe style_tt function allows us to customize the borders that surround eacell of a table, as well horizontal and vertical rules. To control these lines, we use the line, line_width, and line_color arguments. Here’s a brief overview of each of these arguments:\n\nline: This argument specifies where solid lines should be drawn. It is a string that can consist of the following characters:\n\n\"t\": Draw a line at the top of the cell, row, or column.\n\"b\": Draw a line at the bottom of the cell, row, or column.\n\"l\": Draw a line at the left side of the cell, row, or column.\n\"r\": Draw a line at the right side of the cell, row, or column.\nYou can combine these characters to draw lines on multiple sides, such as \"tbl\" to draw lines at the top, bottom, and left sides of a cell.\n\nline_width: This argument controls the width of the solid lines in em units (default: 0.1 em). You can adjust this value to make the lines thicker or thinner.\nline_color: Specifies the color of the solid lines. You can use color names, hexadecimal codes, or other color specifications to define the line color.\n\nHere is an example where we draw lines around every border (“t”, “b”, “l”, and “r”) of specified cells.\n\ntt(x, theme = \"void\") |>\n style_tt(\n i = 0:3,\n j = 1:3,\n line = \"tblr\",\n line_width = 0.4,\n line_color = \"orange\")\n\n \n\n \n \n \n tinytable_jct2uchurm25ki6zmkcx\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nAnd here is an example with horizontal rules:\n\ntt(x, theme = \"void\") |>\n style_tt(i = 0, line = \"t\", line_color = \"orange\", line_width = 0.4) |>\n style_tt(i = 0, line = \"b\", line_color = \"purple\", line_width = 0.2) |>\n style_tt(i = 4, line = \"b\", line_color = \"orange\", line_width = 0.4)\n\n \n\n \n \n \n tinytable_zmma9q4yaqwdmpo75wuq\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", "crumbs": [ "Tutorial (HTML)" ] @@ -453,7 +453,7 @@ "href": "vignettes/tutorial.html#inserting-images-in-tables", "title": "tinytable", "section": "Inserting images in tables", - "text": "Inserting images in tables\nTo insert images in a table, we use the plot_tt() function. The path_img values must be relative to the main document saved by save_tt() or to the Quarto (or Rmarkdown) document in which the code is executed.\n\ndat <- data.frame(\n Species = c(\"Spider\", \"Squirrel\"),\n Image = \"\"\n)\n\nimg <- c(\n \"../figures/spider.png\",\n \"../figures/squirrel.png\"\n)\n\ntt(dat) |>\n plot_tt(j = 2, images = img, height = 3)\n\n \n\n \n \n \n tinytable_8y2whh3fq1cd8fg01w90\n \n \n \n \n \n\n \n \n \n \n \n \n Species\n Image\n \n \n \n \n \n Spider\n \n \n \n Squirrel\n \n \n \n \n \n\n \n\n \n\n\n\n\nIn HTML tables, it is possible to insert tables directly from a web address, but not in LaTeX.\n\ndat <- data.frame(\"R\" = \"\")\nimg <- \"https://cran.r-project.org/Rlogo.svg\"\ntt(dat) |>\n plot_tt(i = 1, j = 1, images = img, height = 7) |>\n style_tt(j = 1, align = \"c\")\n\n \n\n \n \n \n tinytable_8x6567f46pfan6t0sg30\n \n \n \n \n \n\n \n \n \n \n \n \n R", + "text": "Inserting images in tables\nTo insert images in a table, we use the plot_tt() function. The path_img values must be relative to the main document saved by save_tt() or to the Quarto (or Rmarkdown) document in which the code is executed.\n\ndat <- data.frame(\n Species = c(\"Spider\", \"Squirrel\"),\n Image = \"\"\n)\n\nimg <- c(\n \"../figures/spider.png\",\n \"../figures/squirrel.png\"\n)\n\ntt(dat) |>\n plot_tt(j = 2, images = img, height = 3)\n\n \n\n \n \n \n tinytable_t62vggcz97n8jyrhv4ut\n \n \n \n \n \n\n \n \n \n \n \n \n Species\n Image\n \n \n \n \n \n Spider\n \n \n \n Squirrel\n \n \n \n \n \n\n \n\n \n\n\n\n\nIn HTML tables, it is possible to insert tables directly from a web address, but not in LaTeX.\n\ndat <- data.frame(\"R\" = \"\")\nimg <- \"https://cran.r-project.org/Rlogo.svg\"\ntt(dat) |>\n plot_tt(i = 1, j = 1, images = img, height = 7) |>\n style_tt(j = 1, align = \"c\")\n\n \n\n \n \n \n tinytable_a2q1zx2fbl0jhbk3re63\n \n \n \n \n \n\n \n \n \n \n \n \n R", "crumbs": [ "Tutorial (HTML)" ] @@ -463,7 +463,7 @@ "href": "vignettes/tutorial.html#inline-plots", "title": "tinytable", "section": "Inline plots", - "text": "Inline plots\nWe can draw inline plots three ways, with\n\nBuilt-in templates for histograms, density plots, and bar plots\nCustom plots using base R plots.\nCustom plots using ggplot2.\n\nTo draw custom plots, one simply has to define a custom function, whose structure we illustrate below.\n\nBuilt-in plots\nThere are several types of inline plots available by default. For example,\n\nplot_data <- list(mtcars$mpg, mtcars$hp, mtcars$qsec)\n\ndat <- data.frame(\n Variables = c(\"mpg\", \"hp\", \"qsec\"), \n Histogram = \"\",\n Density = \"\",\n Bar = \"\"\n)\n\ntt(dat) |>\n plot_tt(j = 2, fun = \"histogram\", data = plot_data) |>\n plot_tt(j = 3, fun = \"density\", data = plot_data, color = \"darkgreen\") |>\n plot_tt(j = 4, fun = \"bar\", data = list(2, 3, 6), color = \"orange\") |>\n style_tt(j = 2:4, align = \"c\")\n\n \n\n \n \n \n tinytable_2byfjpwojd4wqkvdj3n0\n \n \n \n \n \n\n \n \n \n \n \n \n Variables\n Histogram\n Density\n Bar\n \n \n \n \n \n mpg\n \n \n \n \n \n hp\n \n \n \n \n \n qsec\n \n \n \n \n \n \n \n\n \n\n \n\n\n\n\n\n\nCustom plots: Base R\nImportant: Custom functions must have ... as an argument.\nTo create a custom inline plot using Base R plotting functions, we create a function that returns another function. tinytable will then call that second function internally to generate the plot.\nThis is easier than it sounds! For example:\n\nf <- function(d, ...) {\n function() hist(d, axes = FALSE, ann = FALSE, col = \"lightblue\")\n}\n\nplot_data <- list(mtcars$mpg, mtcars$hp, mtcars$qsec)\n\ndat <- data.frame(Variables = c(\"mpg\", \"hp\", \"qsec\"), Histogram = \"\")\n\ntt(dat) |>\n plot_tt(j = 2, fun = f, data = plot_data)\n\n \n\n \n \n \n tinytable_d52e9vjg113mrbifr4zv\n \n \n \n \n \n\n \n \n \n \n \n \n Variables\n Histogram\n \n \n \n \n \n mpg\n \n \n \n hp\n \n \n \n qsec\n \n \n \n \n \n\n \n\n \n\n\n\n\n\n\nCustom plots: ggplot2\nImportant: Custom functions must have ... as an argument.\nTo create a custom inline plot using ggplot2, we create a function that returns a ggplot object:\n\nlibrary(ggplot2)\n\nf <- function(d, color = \"black\", ...) {\n d <- data.frame(x = d)\n ggplot(d, aes(x = x)) + \n geom_histogram(bins = 30, color = color, fill = color) +\n scale_x_continuous(expand=c(0,0)) +\n scale_y_continuous(expand=c(0,0)) +\n theme_void()\n}\n\nplot_data <- list(mtcars$mpg, mtcars$hp, mtcars$qsec)\n\ntt(dat) |>\n plot_tt(j = 2, fun = f, data = plot_data, color = \"pink\")\n\n \n\n \n \n \n tinytable_c3233dnft2w9kqb1m8s9\n \n \n \n \n \n\n \n \n \n \n \n \n Variables\n Histogram\n \n \n \n \n \n mpg\n \n \n \n hp\n \n \n \n qsec\n \n \n \n \n \n\n \n\n \n\n\n\n\nWe can insert arbitrarily complex plots by customizing the ggplot2 call:\n\nlibrary(palmerpenguins)\n\n# split data by species\ndat <- split(penguins, penguins$species)\nbody <- lapply(dat, \\(x) x$body_mass_g)\nflip <- lapply(dat, \\(x) x$flipper_length_mm)\n\n# create nearly empty table\ntab <- data.frame(\n \"Species\" = names(dat),\n \"Body Mass\" = \"\",\n \"Flipper Length\" = \"\",\n \"Body vs. Flipper\" = \"\",\n check.names = FALSE\n)\n\n# custom ggplot2 function to create inline plot\nf <- function(d, ...) {\n ggplot(d, aes(x = flipper_length_mm, y = body_mass_g, color = sex)) +\n geom_point(size = .2) +\n scale_x_continuous(expand=c(0,0)) +\n scale_y_continuous(expand=c(0,0)) +\n scale_color_manual(values = c(\"#E69F00\", \"#56B4E9\")) +\n theme_void() +\n theme(legend.position = \"none\")\n}\n\n# `tinytable` calls\ntt(tab) |>\n plot_tt(j = 2, fun = \"histogram\", data = body, height = 2) |>\n plot_tt(j = 3, fun = \"density\", data = flip, height = 2) |>\n plot_tt(j = 4, fun = f, data = dat, height = 2) |>\n style_tt(j = 2:4, align = \"c\")\n\n \n\n \n \n \n tinytable_7fhtki94hxk87ht447nq\n \n \n \n \n \n\n \n \n \n \n \n \n Species\n Body Mass\n Flipper Length\n Body vs. Flipper\n \n \n \n \n \n Adelie\n \n \n \n \n \n Chinstrap\n \n \n \n \n \n Gentoo", + "text": "Inline plots\nWe can draw inline plots three ways, with\n\nBuilt-in templates for histograms, density plots, and bar plots\nCustom plots using base R plots.\nCustom plots using ggplot2.\n\nTo draw custom plots, one simply has to define a custom function, whose structure we illustrate below.\n\nBuilt-in plots\nThere are several types of inline plots available by default. For example,\n\nplot_data <- list(mtcars$mpg, mtcars$hp, mtcars$qsec)\n\ndat <- data.frame(\n Variables = c(\"mpg\", \"hp\", \"qsec\"), \n Histogram = \"\",\n Density = \"\",\n Bar = \"\"\n)\n\ntt(dat) |>\n plot_tt(j = 2, fun = \"histogram\", data = plot_data) |>\n plot_tt(j = 3, fun = \"density\", data = plot_data, color = \"darkgreen\") |>\n plot_tt(j = 4, fun = \"bar\", data = list(2, 3, 6), color = \"orange\") |>\n style_tt(j = 2:4, align = \"c\")\n\n \n\n \n \n \n tinytable_y09o54iz8nxhnfasi2fp\n \n \n \n \n \n\n \n \n \n \n \n \n Variables\n Histogram\n Density\n Bar\n \n \n \n \n \n mpg\n \n \n \n \n \n hp\n \n \n \n \n \n qsec\n \n \n \n \n \n \n \n\n \n\n \n\n\n\n\n\n\nCustom plots: Base R\nImportant: Custom functions must have ... as an argument.\nTo create a custom inline plot using Base R plotting functions, we create a function that returns another function. tinytable will then call that second function internally to generate the plot.\nThis is easier than it sounds! For example:\n\nf <- function(d, ...) {\n function() hist(d, axes = FALSE, ann = FALSE, col = \"lightblue\")\n}\n\nplot_data <- list(mtcars$mpg, mtcars$hp, mtcars$qsec)\n\ndat <- data.frame(Variables = c(\"mpg\", \"hp\", \"qsec\"), Histogram = \"\")\n\ntt(dat) |>\n plot_tt(j = 2, fun = f, data = plot_data)\n\n \n\n \n \n \n tinytable_vnyvkrhlmqwcg1fa0x4u\n \n \n \n \n \n\n \n \n \n \n \n \n Variables\n Histogram\n \n \n \n \n \n mpg\n \n \n \n hp\n \n \n \n qsec\n \n \n \n \n \n\n \n\n \n\n\n\n\n\n\nCustom plots: ggplot2\nImportant: Custom functions must have ... as an argument.\nTo create a custom inline plot using ggplot2, we create a function that returns a ggplot object:\n\nlibrary(ggplot2)\n\nf <- function(d, color = \"black\", ...) {\n d <- data.frame(x = d)\n ggplot(d, aes(x = x)) + \n geom_histogram(bins = 30, color = color, fill = color) +\n scale_x_continuous(expand=c(0,0)) +\n scale_y_continuous(expand=c(0,0)) +\n theme_void()\n}\n\nplot_data <- list(mtcars$mpg, mtcars$hp, mtcars$qsec)\n\ntt(dat) |>\n plot_tt(j = 2, fun = f, data = plot_data, color = \"pink\")\n\n \n\n \n \n \n tinytable_ee8dhsh55hh15269fh31\n \n \n \n \n \n\n \n \n \n \n \n \n Variables\n Histogram\n \n \n \n \n \n mpg\n \n \n \n hp\n \n \n \n qsec\n \n \n \n \n \n\n \n\n \n\n\n\n\nWe can insert arbitrarily complex plots by customizing the ggplot2 call:\n\nlibrary(palmerpenguins)\n\n# split data by species\ndat <- split(penguins, penguins$species)\nbody <- lapply(dat, \\(x) x$body_mass_g)\nflip <- lapply(dat, \\(x) x$flipper_length_mm)\n\n# create nearly empty table\ntab <- data.frame(\n \"Species\" = names(dat),\n \"Body Mass\" = \"\",\n \"Flipper Length\" = \"\",\n \"Body vs. Flipper\" = \"\",\n check.names = FALSE\n)\n\n# custom ggplot2 function to create inline plot\nf <- function(d, ...) {\n ggplot(d, aes(x = flipper_length_mm, y = body_mass_g, color = sex)) +\n geom_point(size = .2) +\n scale_x_continuous(expand=c(0,0)) +\n scale_y_continuous(expand=c(0,0)) +\n scale_color_manual(values = c(\"#E69F00\", \"#56B4E9\")) +\n theme_void() +\n theme(legend.position = \"none\")\n}\n\n# `tinytable` calls\ntt(tab) |>\n plot_tt(j = 2, fun = \"histogram\", data = body, height = 2) |>\n plot_tt(j = 3, fun = \"density\", data = flip, height = 2) |>\n plot_tt(j = 4, fun = f, data = dat, height = 2) |>\n style_tt(j = 2:4, align = \"c\")\n\n \n\n \n \n \n tinytable_n2xtbj9n4gf279riydd2\n \n \n \n \n \n\n \n \n \n \n \n \n Species\n Body Mass\n Flipper Length\n Body vs. Flipper\n \n \n \n \n \n Adelie\n \n \n \n \n \n Chinstrap\n \n \n \n \n \n Gentoo", "crumbs": [ "Tutorial (HTML)" ] @@ -473,7 +473,7 @@ "href": "vignettes/tutorial.html#rows", "title": "tinytable", "section": "Rows", - "text": "Rows\nThe i argument accepts a named list of integers. The numbers identify the positions where row group labels are to be inserted. The names includes the text that should be inserted:\n\ndat <- mtcars[1:9, 1:8]\n\ntt(dat) |>\n group_tt(i = list(\n \"I like (fake) hamburgers\" = 3,\n \"She prefers halloumi\" = 4,\n \"They love tofu\" = 7))\n\n \n\n \n \n \n tinytable_xa1jqzmppbmrc695esda\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n wt\n qsec\n vs\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.62\n 16.46\n 0\n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.875\n 17.02\n 0\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n 2.32\n 18.61\n 1\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n 3.215\n 19.44\n 1\n \n \n 18.7\n 8\n 360\n 175\n 3.15\n 3.44\n 17.02\n 0\n \n \n 18.1\n 6\n 225\n 105\n 2.76\n 3.46\n 20.22\n 1\n \n \n 14.3\n 8\n 360\n 245\n 3.21\n 3.57\n 15.84\n 0\n \n \n 24.4\n 4\n 146.7\n 62\n 3.69\n 3.19\n 20\n 1\n \n \n 22.8\n 4\n 140.8\n 95\n 3.92\n 3.15\n 22.9\n 1\n \n \n \n \n\n \n\n \n\n\n\n\nWe can style group rows in the same way as regular rows:\n\ntt(dat) |> \n group_tt(\n i = list(\n \"I like (fake) hamburgers\" = 3,\n \"She prefers halloumi\" = 4,\n \"They love tofu\" = 7)) |>\n style_tt(\n i = c(3, 5, 9),\n align = \"c\",\n color = \"white\",\n background = \"gray\",\n bold = TRUE)\n\n \n\n \n \n \n tinytable_ldoxpc16fn3xntqcn8me\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n wt\n qsec\n vs\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.62\n 16.46\n 0\n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.875\n 17.02\n 0\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n 2.32\n 18.61\n 1\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n 3.215\n 19.44\n 1\n \n \n 18.7\n 8\n 360\n 175\n 3.15\n 3.44\n 17.02\n 0\n \n \n 18.1\n 6\n 225\n 105\n 2.76\n 3.46\n 20.22\n 1\n \n \n 14.3\n 8\n 360\n 245\n 3.21\n 3.57\n 15.84\n 0\n \n \n 24.4\n 4\n 146.7\n 62\n 3.69\n 3.19\n 20\n 1\n \n \n 22.8\n 4\n 140.8\n 95\n 3.92\n 3.15\n 22.9\n 1", + "text": "Rows\nThe i argument accepts a named list of integers. The numbers identify the positions where row group labels are to be inserted. The names includes the text that should be inserted:\n\ndat <- mtcars[1:9, 1:8]\n\ntt(dat) |>\n group_tt(i = list(\n \"I like (fake) hamburgers\" = 3,\n \"She prefers halloumi\" = 4,\n \"They love tofu\" = 7))\n\n \n\n \n \n \n tinytable_t6onb8x66wf4kp3yv2nc\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n wt\n qsec\n vs\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.62\n 16.46\n 0\n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.875\n 17.02\n 0\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n 2.32\n 18.61\n 1\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n 3.215\n 19.44\n 1\n \n \n 18.7\n 8\n 360\n 175\n 3.15\n 3.44\n 17.02\n 0\n \n \n 18.1\n 6\n 225\n 105\n 2.76\n 3.46\n 20.22\n 1\n \n \n 14.3\n 8\n 360\n 245\n 3.21\n 3.57\n 15.84\n 0\n \n \n 24.4\n 4\n 146.7\n 62\n 3.69\n 3.19\n 20\n 1\n \n \n 22.8\n 4\n 140.8\n 95\n 3.92\n 3.15\n 22.9\n 1\n \n \n \n \n\n \n\n \n\n\n\n\nWe can style group rows in the same way as regular rows:\n\ntt(dat) |> \n group_tt(\n i = list(\n \"I like (fake) hamburgers\" = 3,\n \"She prefers halloumi\" = 4,\n \"They love tofu\" = 7)) |>\n style_tt(\n i = c(3, 5, 9),\n align = \"c\",\n color = \"white\",\n background = \"gray\",\n bold = TRUE)\n\n \n\n \n \n \n tinytable_ktl61pknhsattzhi6pxi\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n wt\n qsec\n vs\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.62\n 16.46\n 0\n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.875\n 17.02\n 0\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n 2.32\n 18.61\n 1\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n 3.215\n 19.44\n 1\n \n \n 18.7\n 8\n 360\n 175\n 3.15\n 3.44\n 17.02\n 0\n \n \n 18.1\n 6\n 225\n 105\n 2.76\n 3.46\n 20.22\n 1\n \n \n 14.3\n 8\n 360\n 245\n 3.21\n 3.57\n 15.84\n 0\n \n \n 24.4\n 4\n 146.7\n 62\n 3.69\n 3.19\n 20\n 1\n \n \n 22.8\n 4\n 140.8\n 95\n 3.92\n 3.15\n 22.9\n 1", "crumbs": [ "Tutorial (HTML)" ] @@ -483,7 +483,7 @@ "href": "vignettes/tutorial.html#columns", "title": "tinytable", "section": "Columns", - "text": "Columns\nThe syntax for column groups is very similar, but we use the j argument instead. The named list specifies the labels to appear in column-spanning labels, and the values must be a vector of consecutive and non-overlapping integers that indicate which columns are associated to which labels:\n\ntt(dat) |> \n group_tt(\n j = list(\n \"Hamburgers\" = 1:3,\n \"Halloumi\" = 4:5,\n \"Tofu\" = 7))\n\n \n\n \n \n \n tinytable_du2jpkmew1snpsorp2h7\n \n \n \n \n \n\n \n \n \n \nHamburgers\nHalloumi\n \nTofu\n \n \n \n mpg\n cyl\n disp\n hp\n drat\n wt\n qsec\n vs\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.62\n 16.46\n 0\n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.875\n 17.02\n 0\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n 2.32\n 18.61\n 1\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n 3.215\n 19.44\n 1\n \n \n 18.7\n 8\n 360\n 175\n 3.15\n 3.44\n 17.02\n 0\n \n \n 18.1\n 6\n 225\n 105\n 2.76\n 3.46\n 20.22\n 1\n \n \n 14.3\n 8\n 360\n 245\n 3.21\n 3.57\n 15.84\n 0\n \n \n 24.4\n 4\n 146.7\n 62\n 3.69\n 3.19\n 20\n 1\n \n \n 22.8\n 4\n 140.8\n 95\n 3.92\n 3.15\n 22.9\n 1\n \n \n \n \n\n \n\n \n\n\n\n\nHere is a table with both row and column headers, as well as some styling:\n\ndat <- mtcars[1:9, 1:8]\ntt(dat) |> \n group_tt(\n i = list(\"I like (fake) hamburgers\" = 3,\n \"She prefers halloumi\" = 4,\n \"They love tofu\" = 7),\n j = list(\"Hamburgers\" = 1:3,\n \"Halloumi\" = 4:5,\n \"Tofu\" = 7)) |>\n style_tt(\n i = c(3, 5, 9),\n align = \"c\",\n background = \"teal\",\n color = \"white\") |>\n style_tt(i = -1, color = \"teal\")\n\n \n\n \n \n \n tinytable_zrprg8qudlp80hsj9cl4\n \n \n \n \n \n\n \n \n \n \nHamburgers\nHalloumi\n \nTofu\n \n \n \n mpg\n cyl\n disp\n hp\n drat\n wt\n qsec\n vs\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.62\n 16.46\n 0\n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.875\n 17.02\n 0\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n 2.32\n 18.61\n 1\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n 3.215\n 19.44\n 1\n \n \n 18.7\n 8\n 360\n 175\n 3.15\n 3.44\n 17.02\n 0\n \n \n 18.1\n 6\n 225\n 105\n 2.76\n 3.46\n 20.22\n 1\n \n \n 14.3\n 8\n 360\n 245\n 3.21\n 3.57\n 15.84\n 0\n \n \n 24.4\n 4\n 146.7\n 62\n 3.69\n 3.19\n 20\n 1\n \n \n 22.8\n 4\n 140.8\n 95\n 3.92\n 3.15\n 22.9\n 1", + "text": "Columns\nThe syntax for column groups is very similar, but we use the j argument instead. The named list specifies the labels to appear in column-spanning labels, and the values must be a vector of consecutive and non-overlapping integers that indicate which columns are associated to which labels:\n\ntt(dat) |> \n group_tt(\n j = list(\n \"Hamburgers\" = 1:3,\n \"Halloumi\" = 4:5,\n \"Tofu\" = 7))\n\n \n\n \n \n \n tinytable_jte3tsojw6bxwu1wlpm1\n \n \n \n \n \n\n \n \n \n \nHamburgers\nHalloumi\n \nTofu\n \n \n \n mpg\n cyl\n disp\n hp\n drat\n wt\n qsec\n vs\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.62\n 16.46\n 0\n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.875\n 17.02\n 0\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n 2.32\n 18.61\n 1\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n 3.215\n 19.44\n 1\n \n \n 18.7\n 8\n 360\n 175\n 3.15\n 3.44\n 17.02\n 0\n \n \n 18.1\n 6\n 225\n 105\n 2.76\n 3.46\n 20.22\n 1\n \n \n 14.3\n 8\n 360\n 245\n 3.21\n 3.57\n 15.84\n 0\n \n \n 24.4\n 4\n 146.7\n 62\n 3.69\n 3.19\n 20\n 1\n \n \n 22.8\n 4\n 140.8\n 95\n 3.92\n 3.15\n 22.9\n 1\n \n \n \n \n\n \n\n \n\n\n\n\nHere is a table with both row and column headers, as well as some styling:\n\ndat <- mtcars[1:9, 1:8]\ntt(dat) |> \n group_tt(\n i = list(\"I like (fake) hamburgers\" = 3,\n \"She prefers halloumi\" = 4,\n \"They love tofu\" = 7),\n j = list(\"Hamburgers\" = 1:3,\n \"Halloumi\" = 4:5,\n \"Tofu\" = 7)) |>\n style_tt(\n i = c(3, 5, 9),\n align = \"c\",\n background = \"teal\",\n color = \"white\") |>\n style_tt(i = -1, color = \"teal\")\n\n \n\n \n \n \n tinytable_cig0fv47c1ir98ivt65l\n \n \n \n \n \n\n \n \n \n \nHamburgers\nHalloumi\n \nTofu\n \n \n \n mpg\n cyl\n disp\n hp\n drat\n wt\n qsec\n vs\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.62\n 16.46\n 0\n \n \n 21\n 6\n 160\n 110\n 3.9\n 2.875\n 17.02\n 0\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n 2.32\n 18.61\n 1\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n 3.215\n 19.44\n 1\n \n \n 18.7\n 8\n 360\n 175\n 3.15\n 3.44\n 17.02\n 0\n \n \n 18.1\n 6\n 225\n 105\n 2.76\n 3.46\n 20.22\n 1\n \n \n 14.3\n 8\n 360\n 245\n 3.21\n 3.57\n 15.84\n 0\n \n \n 24.4\n 4\n 146.7\n 62\n 3.69\n 3.19\n 20\n 1\n \n \n 22.8\n 4\n 140.8\n 95\n 3.92\n 3.15\n 22.9\n 1", "crumbs": [ "Tutorial (HTML)" ] @@ -493,7 +493,7 @@ "href": "vignettes/tutorial.html#bootstrap-classes", "title": "tinytable", "section": "Bootstrap classes", - "text": "Bootstrap classes\nThe Bootstrap framework provides a number of built-in themes to style tables, using “classes.” To use them, we call style_tt() with the bootstrap_class argument. A list of available Bootstrap classes can be found here: https://getbootstrap.com/docs/5.3/content/tables/\nFor example, to produce a “bordered” table, we use the table-bordered class:\n\ntt(x) |> style_tt(bootstrap_class = \"table table-bordered\")\n\n \n\n \n \n \n tinytable_rfu3nraqg7kot5vaqp8v\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWe can also combine several Bootstrap classes. Here, we get a table with the “hover” feature:\n\ntt(x) |> style_tt(\n bootstrap_class = \"table table-hover\")\n\n \n\n \n \n \n tinytable_0hu6myc5962rbtdh3ujc\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", + "text": "Bootstrap classes\nThe Bootstrap framework provides a number of built-in themes to style tables, using “classes.” To use them, we call style_tt() with the bootstrap_class argument. A list of available Bootstrap classes can be found here: https://getbootstrap.com/docs/5.3/content/tables/\nFor example, to produce a “bordered” table, we use the table-bordered class:\n\ntt(x) |> style_tt(bootstrap_class = \"table table-bordered\")\n\n \n\n \n \n \n tinytable_w22qogvp1mibjuc8cxod\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08\n \n \n \n \n\n \n\n \n\n\n\n\nWe can also combine several Bootstrap classes. Here, we get a table with the “hover” feature:\n\ntt(x) |> style_tt(\n bootstrap_class = \"table table-hover\")\n\n \n\n \n \n \n tinytable_458em7x4q27b9qfe2x4t\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", "crumbs": [ "Tutorial (HTML)" ] @@ -503,7 +503,7 @@ "href": "vignettes/tutorial.html#css-declarations", "title": "tinytable", "section": "CSS declarations", - "text": "CSS declarations\nThe style_tt() function allows us to declare CSS properties and values for individual cells, columns, or rows of a table. For example, if we want to make the first column bold, we could do:\n\ntt(x) |>\n style_tt(j = 1, bootstrap_css = \"font-weight: bold; color: red;\")\n\n \n\n \n \n \n tinytable_dc1oingqd69kpigeajnm\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", + "text": "CSS declarations\nThe style_tt() function allows us to declare CSS properties and values for individual cells, columns, or rows of a table. For example, if we want to make the first column bold, we could do:\n\ntt(x) |>\n style_tt(j = 1, bootstrap_css = \"font-weight: bold; color: red;\")\n\n \n\n \n \n \n tinytable_n8hd1mamly021a431cid\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", "crumbs": [ "Tutorial (HTML)" ] @@ -513,7 +513,7 @@ "href": "vignettes/tutorial.html#css-rules", "title": "tinytable", "section": "CSS rules", - "text": "CSS rules\nFor more extensive customization, we can use complete CSS rules. In this example, we define several rules that apply to a new class called mytable. Then, we use the theme argument of the tt() function to ensure that our tiny table is of class mytable. Finally, we call style_bootstrap() to apply the rules with the bootstrap_css_rule argument.\n\ncss_rule <- \"\n.mytable {\n background: linear-gradient(45deg, #EA8D8D, #A890FE);\n width: 600px;\n border-collapse: collapse;\n overflow: hidden;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n}\n\n.mytable th,\n.mytable td {\n padding: 5px;\n background-color: rgba(255,255,255,0.2);\n color: #fff;\n}\n\n.mytable tbody tr:hover {\n background-color: rgba(255,255,255,0.3);\n}\n\n.mytable tbody td:hover:before {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: -9999px;\n bottom: -9999px;\n background-color: rgba(255,255,255,0.2);\n z-index: -1;\n}\n\"\n\ntt(x, width = 2/3) |> \n style_tt(\n j = 1:5,\n align = \"ccccc\",\n bootstrap_class = \"table mytable\",\n bootstrap_css_rule = css_rule)\n\n \n\n \n \n \n tinytable_t2n98dfhdx85o3odqe8e\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", + "text": "CSS rules\nFor more extensive customization, we can use complete CSS rules. In this example, we define several rules that apply to a new class called mytable. Then, we use the theme argument of the tt() function to ensure that our tiny table is of class mytable. Finally, we call style_bootstrap() to apply the rules with the bootstrap_css_rule argument.\n\ncss_rule <- \"\n.mytable {\n background: linear-gradient(45deg, #EA8D8D, #A890FE);\n width: 600px;\n border-collapse: collapse;\n overflow: hidden;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n}\n\n.mytable th,\n.mytable td {\n padding: 5px;\n background-color: rgba(255,255,255,0.2);\n color: #fff;\n}\n\n.mytable tbody tr:hover {\n background-color: rgba(255,255,255,0.3);\n}\n\n.mytable tbody td:hover:before {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: -9999px;\n bottom: -9999px;\n background-color: rgba(255,255,255,0.2);\n z-index: -1;\n}\n\"\n\ntt(x, width = 2/3) |> \n style_tt(\n j = 1:5,\n align = \"ccccc\",\n bootstrap_class = \"table mytable\",\n bootstrap_css_rule = css_rule)\n\n \n\n \n \n \n tinytable_0xzuerotnrkyfhvo45qc\n \n \n \n \n \n\n \n \n \n \n \n \n mpg\n cyl\n disp\n hp\n drat\n \n \n \n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 21\n 6\n 160\n 110\n 3.9\n \n \n 22.8\n 4\n 108\n 93\n 3.85\n \n \n 21.4\n 6\n 258\n 110\n 3.08", "crumbs": [ "Tutorial (HTML)" ] @@ -553,7 +553,7 @@ "href": "NEWS.html", "title": "News", "section": "", - "text": "New:\n\nSupport for Typst tables using tablex:\n\nhttps://typst.app/\nhttps://github.com/PgBiel/typst-tablex\n\nnotes argument in tt() can insert superscript markers inside cells to refer to notes at the bottom of the page.\n\ntt(x, notes = list(\"*\" = list(i = 0:1, j = 2, text = \"Hello world)))\n\n\n\n\n\nImprovements:\n\nRules and cell borders: line, line_width, and line_color arguments.\nEnhanced knitr output detection.\nNew themes.\nCaption argument support for Markdown tables.\nDefensive programming enhancements.\nplot_tt() regular expression column selection.\nHeader/footer are no longer indented by group_tt(i).\n\nBug fixes:\n\nInline plots visibility in RStudio viewer pane.\nBug in group_tt(i) for markdown and docx output.\nResolved style_tt resetting issue.\nBug fix for column alignment in markdown affecting docx output.\n\nDocumentation:\n\nImproved vignette on the package website.\nVarious documentation updates.\nMath in $$ is new recommendation.\n\n\n\n\nInitial package release. Yay!", + "text": "New:\n\nTypst tables are now supported using the tablex extension:\n\nhttps://typst.app/\nhttps://github.com/PgBiel/typst-tablex\n\nnotes argument in tt() can insert superscript markers inside cells to refer to notes at the bottom of the page.\n\ntt(x, notes = list(\"*\" = list(i = 0:1, j = 2, text = \"Hello world)))\n\nnotes agument in tt() now works wth Markdown and Word, but must be a single string.\n\n\n\n\nImprovements:\n\nRules and cell borders: line, line_width, and line_color arguments.\nEnhanced knitr output detection.\nNew themes.\nCaption argument support for Markdown tables.\nDefensive programming enhancements.\nplot_tt() regular expression column selection.\nHeader/footer are no longer indented by group_tt(i).\n\nBug fixes:\n\nInline plots visibility in RStudio viewer pane.\nBug in group_tt(i) for markdown and docx output.\nResolved style_tt resetting issue.\nBug fix for column alignment in markdown affecting docx output.\n\nDocumentation:\n\nImproved vignette on the package website.\nVarious documentation updates.\nMath in $$ is new recommendation.\n\n\n\n\nInitial package release. Yay!", "crumbs": [ "Tutorial (HTML)", "News" @@ -564,7 +564,7 @@ "href": "NEWS.html#development", "title": "News", "section": "", - "text": "New:\n\nSupport for Typst tables using tablex:\n\nhttps://typst.app/\nhttps://github.com/PgBiel/typst-tablex\n\nnotes argument in tt() can insert superscript markers inside cells to refer to notes at the bottom of the page.\n\ntt(x, notes = list(\"*\" = list(i = 0:1, j = 2, text = \"Hello world)))", + "text": "New:\n\nTypst tables are now supported using the tablex extension:\n\nhttps://typst.app/\nhttps://github.com/PgBiel/typst-tablex\n\nnotes argument in tt() can insert superscript markers inside cells to refer to notes at the bottom of the page.\n\ntt(x, notes = list(\"*\" = list(i = 0:1, j = 2, text = \"Hello world)))\n\nnotes agument in tt() now works wth Markdown and Word, but must be a single string.", "crumbs": [ "Tutorial (HTML)", "News" diff --git a/vignettes/tinytable_assets/id23142hw9p0uy3jtkz5xo.png b/vignettes/tinytable_assets/id23142hw9p0uy3jtkz5xo.png new file mode 100644 index 00000000..5e33c88b Binary files /dev/null and b/vignettes/tinytable_assets/id23142hw9p0uy3jtkz5xo.png differ diff --git a/vignettes/tinytable_assets/id2d76ihaksm8ppvleo6ex.png b/vignettes/tinytable_assets/id2d76ihaksm8ppvleo6ex.png new file mode 100644 index 00000000..2a3649f8 Binary files /dev/null and b/vignettes/tinytable_assets/id2d76ihaksm8ppvleo6ex.png differ diff --git a/vignettes/tinytable_assets/id3itf89rgr2e4hx7kyxfh.png b/vignettes/tinytable_assets/id3itf89rgr2e4hx7kyxfh.png new file mode 100644 index 00000000..6cee967b Binary files /dev/null and b/vignettes/tinytable_assets/id3itf89rgr2e4hx7kyxfh.png differ diff --git a/vignettes/tinytable_assets/id5g472d5kv5wyutyeyoa4.png b/vignettes/tinytable_assets/id5g472d5kv5wyutyeyoa4.png new file mode 100644 index 00000000..ad809c1c Binary files /dev/null and b/vignettes/tinytable_assets/id5g472d5kv5wyutyeyoa4.png differ diff --git a/vignettes/tinytable_assets/id89hbiuds6eijhkbgl2hq.png b/vignettes/tinytable_assets/id89hbiuds6eijhkbgl2hq.png new file mode 100644 index 00000000..f3f966d9 Binary files /dev/null and b/vignettes/tinytable_assets/id89hbiuds6eijhkbgl2hq.png differ diff --git a/vignettes/tinytable_assets/id8x8cfczdbnqd1kd044pg.png b/vignettes/tinytable_assets/id8x8cfczdbnqd1kd044pg.png new file mode 100644 index 00000000..0ba387fc Binary files /dev/null and b/vignettes/tinytable_assets/id8x8cfczdbnqd1kd044pg.png differ diff --git a/vignettes/tinytable_assets/ida7g6jfskfg7mlkfvs8fb.png b/vignettes/tinytable_assets/ida7g6jfskfg7mlkfvs8fb.png new file mode 100644 index 00000000..e0b2cddc Binary files /dev/null and b/vignettes/tinytable_assets/ida7g6jfskfg7mlkfvs8fb.png differ diff --git a/vignettes/tinytable_assets/idefnbjkx0m14wzlklw7s4.png b/vignettes/tinytable_assets/idefnbjkx0m14wzlklw7s4.png new file mode 100644 index 00000000..b6cc9f62 Binary files /dev/null and b/vignettes/tinytable_assets/idefnbjkx0m14wzlklw7s4.png differ diff --git a/vignettes/tinytable_assets/idfqjru9482g5a8g90r3g8.png b/vignettes/tinytable_assets/idfqjru9482g5a8g90r3g8.png new file mode 100644 index 00000000..8eaafeb9 Binary files /dev/null and b/vignettes/tinytable_assets/idfqjru9482g5a8g90r3g8.png differ diff --git a/vignettes/tinytable_assets/idgoqnredauygth2efiioc.png b/vignettes/tinytable_assets/idgoqnredauygth2efiioc.png new file mode 100644 index 00000000..8ec24e8d Binary files /dev/null and b/vignettes/tinytable_assets/idgoqnredauygth2efiioc.png differ diff --git a/vignettes/tinytable_assets/idj4azdj879ctr072cxj66.png b/vignettes/tinytable_assets/idj4azdj879ctr072cxj66.png new file mode 100644 index 00000000..82861ab5 Binary files /dev/null and b/vignettes/tinytable_assets/idj4azdj879ctr072cxj66.png differ diff --git a/vignettes/tinytable_assets/idj5y0ey1ce1z4b9gd37aj.png b/vignettes/tinytable_assets/idj5y0ey1ce1z4b9gd37aj.png new file mode 100644 index 00000000..79205456 Binary files /dev/null and b/vignettes/tinytable_assets/idj5y0ey1ce1z4b9gd37aj.png differ diff --git a/vignettes/tinytable_assets/idjvyujo3lzxdtmfikfkxg.png b/vignettes/tinytable_assets/idjvyujo3lzxdtmfikfkxg.png new file mode 100644 index 00000000..d7222e0f Binary files /dev/null and b/vignettes/tinytable_assets/idjvyujo3lzxdtmfikfkxg.png differ diff --git a/vignettes/tinytable_assets/idk9k46f1zl0l99yllad8k.png b/vignettes/tinytable_assets/idk9k46f1zl0l99yllad8k.png new file mode 100644 index 00000000..95e77745 Binary files /dev/null and b/vignettes/tinytable_assets/idk9k46f1zl0l99yllad8k.png differ diff --git a/vignettes/tinytable_assets/idnwxbosxi4y9loiaffiay.png b/vignettes/tinytable_assets/idnwxbosxi4y9loiaffiay.png new file mode 100644 index 00000000..5e2927f9 Binary files /dev/null and b/vignettes/tinytable_assets/idnwxbosxi4y9loiaffiay.png differ diff --git a/vignettes/tinytable_assets/idpd24ofo7nq7lovgs73tm.png b/vignettes/tinytable_assets/idpd24ofo7nq7lovgs73tm.png new file mode 100644 index 00000000..b6465812 Binary files /dev/null and b/vignettes/tinytable_assets/idpd24ofo7nq7lovgs73tm.png differ diff --git a/vignettes/tinytable_assets/idrk8slnzc93bcdx4umxwj.png b/vignettes/tinytable_assets/idrk8slnzc93bcdx4umxwj.png new file mode 100644 index 00000000..bfc66e8f Binary files /dev/null and b/vignettes/tinytable_assets/idrk8slnzc93bcdx4umxwj.png differ diff --git a/vignettes/tinytable_assets/idsqwe5whmz1oeggjp3gxs.png b/vignettes/tinytable_assets/idsqwe5whmz1oeggjp3gxs.png new file mode 100644 index 00000000..79a35013 Binary files /dev/null and b/vignettes/tinytable_assets/idsqwe5whmz1oeggjp3gxs.png differ diff --git a/vignettes/tinytable_assets/idve0ddfmj8v2iyh2zv55i.png b/vignettes/tinytable_assets/idve0ddfmj8v2iyh2zv55i.png new file mode 100644 index 00000000..80279d32 Binary files /dev/null and b/vignettes/tinytable_assets/idve0ddfmj8v2iyh2zv55i.png differ diff --git a/vignettes/tinytable_assets/idvyj173fnnzi765o1yjpq.png b/vignettes/tinytable_assets/idvyj173fnnzi765o1yjpq.png new file mode 100644 index 00000000..fa8a2afc Binary files /dev/null and b/vignettes/tinytable_assets/idvyj173fnnzi765o1yjpq.png differ diff --git a/vignettes/tinytable_assets/idwn9lqwaalm38289k8t1t.png b/vignettes/tinytable_assets/idwn9lqwaalm38289k8t1t.png new file mode 100644 index 00000000..4e1ff0a7 Binary files /dev/null and b/vignettes/tinytable_assets/idwn9lqwaalm38289k8t1t.png differ diff --git a/vignettes/tinytable_assets/idx0ri2ot3f8lfhvy3ukyy.png b/vignettes/tinytable_assets/idx0ri2ot3f8lfhvy3ukyy.png new file mode 100644 index 00000000..3f008627 Binary files /dev/null and b/vignettes/tinytable_assets/idx0ri2ot3f8lfhvy3ukyy.png differ diff --git a/vignettes/tinytable_assets/idzkch333nwtnvnrgyhphz.png b/vignettes/tinytable_assets/idzkch333nwtnvnrgyhphz.png new file mode 100644 index 00000000..0e9656bb Binary files /dev/null and b/vignettes/tinytable_assets/idzkch333nwtnvnrgyhphz.png differ diff --git a/vignettes/tinytable_assets/idzwm1bmcoxh2txmf2ccw2.png b/vignettes/tinytable_assets/idzwm1bmcoxh2txmf2ccw2.png new file mode 100644 index 00000000..04b900e8 Binary files /dev/null and b/vignettes/tinytable_assets/idzwm1bmcoxh2txmf2ccw2.png differ diff --git a/vignettes/tutorial.html b/vignettes/tutorial.html index 36228671..39bd8f9d 100644 --- a/vignettes/tutorial.html +++ b/vignettes/tutorial.html @@ -361,9 +361,9 @@

Tiny Tables: tt()

- tinytable_edbgt0386ixo6zc3syu6 + tinytable_ymglcp53iw4gy0w7kl06 @@ -381,7 +381,7 @@

Tiny Tables: tt()

- +
@@ -427,12 +427,12 @@

Tiny Tables: tt()

@@ -463,9 +463,9 @@

Themes

- tinytable_4hc8wcuxw7fsvb3vdffv + tinytable_0h0y3b3f1cvkscb545xo @@ -483,7 +483,7 @@

Themes

-
+
@@ -529,12 +529,12 @@

Themes

@@ -577,9 +577,9 @@

Themes

- tinytable_fer6z07nkj70e6v6q10p + tinytable_lbmebzvbmcqx6m5lvf8x @@ -597,7 +597,7 @@

Themes

-
+
@@ -643,12 +643,12 @@

Themes

@@ -691,9 +691,9 @@

Themes

- tinytable_uefi1imetl9e2jimixfs + tinytable_w0id5kwcdri30cdwiqe9 @@ -711,7 +711,7 @@

Themes

-
+
@@ -757,12 +757,12 @@

Themes

@@ -809,9 +809,9 @@

Width

- tinytable_ztz8qv89m5g951264xqn + tinytable_23ghv1u22uxyhogo3flk @@ -829,7 +829,7 @@

Width

-
+
@@ -875,12 +875,12 @@

Width

@@ -908,9 +908,9 @@

Width

- tinytable_sqjsibk9d9knnwg93cay + tinytable_lpupc2cmznwuzl3c9gxg @@ -928,7 +928,7 @@

Width

-
+
@@ -974,12 +974,12 @@

Width

@@ -1028,9 +1028,9 @@

Captions and - tinytable_zeuc6gf8nrq06ku4f7qo + tinytable_oxbqk25l77ibsxuggwys @@ -1048,7 +1048,7 @@

Captions and
-

+
@@ -1089,12 +1089,12 @@

Captions and @@ -1140,9 +1140,9 @@

Footnotes

- tinytable_11pv4gn9pph5cyiyo14x + tinytable_ks3k1c39kj7dksjlow3w @@ -1160,7 +1160,7 @@

Footnotes

-
+
@@ -1179,12 +1179,12 @@

Footnotes

@@ -1207,9 +1207,9 @@

Footnotes

- tinytable_c6rn6k9z26oy1291zqg2 + tinytable_iidyu68zo1lekv32yog6 @@ -1227,7 +1227,7 @@

Footnotes

-
+
@@ -1246,12 +1246,12 @@

Footnotes

@@ -1278,9 +1278,9 @@

Footnotes

- tinytable_q3fe77hyl0qzn9wrjsai + tinytable_szby25cex4v5do5xjuxc @@ -1298,7 +1298,7 @@

Footnotes

-
+
@@ -1345,12 +1345,12 @@

Footnotes

@@ -1383,9 +1383,9 @@

Footnotes

- tinytable_y0sxepr88rxgbt98qayq + tinytable_07m40sx9u988l3z3ze4t @@ -1403,7 +1403,7 @@

Footnotes

-
+
@@ -1450,12 +1450,12 @@

Footnotes

@@ -1487,9 +1487,9 @@

Line breaks - tinytable_3bkeqbft3pux74zc9dxe + tinytable_a93sqo9i271gv2bhfx07 @@ -1507,7 +1507,7 @@

Line breaks
-

+

A full width table with wrapped text.

@@ -1526,12 +1526,12 @@

Line breaks @@ -1561,9 +1561,9 @@

Line breaks - tinytable_amwjk9ey8fdu84fagzet + tinytable_2hjfa25p07r23ziyer4t @@ -1581,7 +1581,7 @@

Line breaks
-

A full width table with wrapped text.

+
@@ -1600,12 +1600,12 @@

Line breaks @@ -1638,10 +1638,10 @@

Math

- tinytable_co1htnew3aao85tygxqk + tinytable_g2tmnwal1dtkpp3na7sl @@ -1659,7 +1659,7 @@

Math

-
+
@@ -1679,12 +1679,12 @@

Math

@@ -1715,9 +1715,9 @@

Line break - tinytable_ykkbl3yevwa0e8jbys11 + tinytable_vjggcrojz2jazdbdvwb3 @@ -1735,7 +1735,7 @@

Line break
-

+

A full width table with wrapped text.

@@ -1754,12 +1754,12 @@

Line break @@ -1789,9 +1789,9 @@

Line break - tinytable_a7mfkpk70ebgbttw4bg2 + tinytable_md2m8eeoi1e8g6x4cqjy @@ -1809,7 +1809,7 @@

Line break
-

A full width table with wrapped text.

+
@@ -1828,12 +1828,12 @@

Line break @@ -1948,9 +1948,9 @@

Numbers, dates, - tinytable_dl86i8f4cs8cqkwx1ob8 + tinytable_ertxhm1bvnivge24b44u @@ -1968,7 +1968,7 @@

Numbers, dates,
-

+
@@ -1983,19 +1983,19 @@

Numbers, dates,

- + - + - + @@ -2003,12 +2003,12 @@

Numbers, dates, @@ -2046,9 +2046,9 @@

Numbers, dates, - tinytable_2d9ebpwysg3817ko6syu + tinytable_jv02rtzojb8wc7he1knp @@ -2066,7 +2066,7 @@

Numbers, dates,
-

143002 1.431970-06-251972-01-31 True
201399 201.401970-03-121971-01-01 True
100188 0.131971-03-031970-08-24 False
+
@@ -2081,19 +2081,19 @@

Numbers, dates,

- + - + - + @@ -2101,12 +2101,12 @@

Numbers, dates, @@ -2141,9 +2141,9 @@

Numbers, dates, - tinytable_ec7u48k51nggij2pp29s + tinytable_viwr260tnohm5t7g95hg @@ -2161,7 +2161,7 @@

Numbers, dates,
-

143 002,21 1.4June 25 1970January 31 1972 True
201 399,18 201.4March 12 1970January 01 1971 True
100 188,39 0.1March 03 1971August 24 1970 False
+
@@ -2197,12 +2197,12 @@

Numbers, dates, @@ -2254,10 +2254,10 @@

Markdown

- tinytable_9rtuwpa3iu0cvxqwyy1t + tinytable_41z2od4xtdleqbyq1yy2 @@ -2275,7 +2275,7 @@

Markdown

-
+
@@ -2295,12 +2295,12 @@

Markdown

@@ -2358,9 +2358,9 @@

Markdown

- tinytable_g4hudqa0aible8shrn4z + tinytable_s6c752b65p4gobrmv87q @@ -2378,7 +2378,7 @@

Markdown

-
+

Vincent sometimes contributes to these R packages.

@@ -2437,12 +2437,12 @@

Markdown

@@ -2501,10 +2501,10 @@

Cells, rows, columns - tinytable_kkzecrr1x0thg5dxtqd6 + tinytable_fpsq8evtemom6d8hlcz0 @@ -2522,7 +2522,7 @@

Cells, rows, columns -

Vincent sometimes contributes to these R packages.

+
@@ -2568,12 +2568,12 @@

Cells, rows, columns @@ -2608,10 +2608,10 @@

Cells, rows, columns - tinytable_9tqh17ilwf2e2chc9drc + tinytable_xfirs2a8ji49buon27kl @@ -2629,7 +2629,7 @@

Cells, rows, columns -

+
@@ -2675,12 +2675,12 @@

Cells, rows, columns @@ -2715,10 +2715,10 @@

Cells, rows, columns - tinytable_e1vwm64e62y4admhqzdf + tinytable_v8mopbxinco77hlxqyo8 @@ -2736,7 +2736,7 @@

Cells, rows, columns -

+
@@ -2782,12 +2782,12 @@

Cells, rows, columns @@ -2836,10 +2836,10 @@

Cells, rows, columns - tinytable_2thutaki28pcu8gahjgn + tinytable_5v906pmuvp43422y6k5q @@ -2857,7 +2857,7 @@

Cells, rows, columns -

+
@@ -2903,12 +2903,12 @@

Cells, rows, columns @@ -2947,10 +2947,10 @@

Cells, rows, columns - tinytable_iqfv3z20yi7jkn07m6f5 + tinytable_006zpkudse7nnyo7vtdx @@ -2968,7 +2968,7 @@

Cells, rows, columns -

+
@@ -3014,12 +3014,12 @@

Cells, rows, columns @@ -3058,10 +3058,10 @@

Cells, rows, columns - tinytable_r64o4u3r2mfmz9j5qe5b + tinytable_iurmfcdsjr5drfgxcmmm @@ -3079,7 +3079,7 @@

Cells, rows, columns -

+
@@ -3125,12 +3125,12 @@

Cells, rows, columns @@ -3171,11 +3171,11 @@

Cells, rows, columns - tinytable_6sjkxs5zdq8tegn1xyij + tinytable_lbnt88eos8pdkf5mh85q @@ -3193,7 +3193,7 @@

Cells, rows, columns -

+
@@ -3239,12 +3239,12 @@

Cells, rows, columns @@ -3293,10 +3293,10 @@

Colors

- tinytable_vod72ygrb5sdkocpxoxi + tinytable_w77m3uy6k4go1tttiyxr @@ -3314,7 +3314,7 @@

Colors

-
+
@@ -3360,12 +3360,12 @@

Colors

@@ -3407,10 +3407,10 @@

Alignment

- tinytable_c4zns70ps50uwuydc0yx + tinytable_ewx6f2n13qcdavpp3dod @@ -3428,7 +3428,7 @@

Alignment

-
+
@@ -3459,12 +3459,12 @@

Alignment

@@ -3500,12 +3500,12 @@

Alignment

- tinytable_t0fasgk6a5hhfmnfaulp + tinytable_zy7ibiu9ycklalcymmpj @@ -3523,7 +3523,7 @@

Alignment

-
+
@@ -3554,12 +3554,12 @@

Alignment

@@ -3601,10 +3601,10 @@

Fonts

- tinytable_f7el9csj2imhtr8qh28p + tinytable_wkfdhwr7058233ep9l6h @@ -3622,7 +3622,7 @@

Fonts

-
+
@@ -3668,12 +3668,12 @@

Fonts

@@ -3717,9 +3717,9 @@

Headers

- tinytable_g3cmihm5v08qgoneeb1t + tinytable_9akelkciq9ao3626176y @@ -3737,7 +3737,7 @@

Headers

-
+
@@ -3776,12 +3776,12 @@

Headers

@@ -3810,10 +3810,10 @@

Headers

- tinytable_a5vokbptovkv80gfh1nd + tinytable_i9nus4wzn9acrx7khriy @@ -3831,7 +3831,7 @@

Headers

-
+
@@ -3877,12 +3877,12 @@

Headers

@@ -3916,10 +3916,10 @@

Headers

- tinytable_kldmrxt0xe5a6slwn85f + tinytable_mpwkx480njicw1k4tyhz @@ -3937,7 +3937,7 @@

Headers

-
+
@@ -3983,12 +3983,12 @@

Headers

@@ -4036,10 +4036,10 @@

Conditional styling - tinytable_f5b8uvti7x2f2fyry9yw + tinytable_99jafym6jhlsmqguc83x @@ -4057,7 +4057,7 @@

Conditional styling -

+
@@ -4123,12 +4123,12 @@

Conditional styling @@ -4170,13 +4170,13 @@

Vectorized sty - tinytable_k49xddwzarke5t3ngj72 + tinytable_urdyq2cy7gmyuurm7vaz @@ -4194,7 +4194,7 @@

Vectorized sty
-

+
@@ -4240,12 +4240,12 @@

Vectorized sty @@ -4298,11 +4298,11 @@

Vectorized sty - tinytable_axisc9ao1culi6nt24un + tinytable_orvtfhz58n5kvcxpogq3 @@ -4320,7 +4320,7 @@

Vectorized sty
-

+
@@ -4366,12 +4366,12 @@

Vectorized sty @@ -4429,30 +4429,30 @@

Vectorized sty - tinytable_r3rlqjt226gqeutinxo9 + tinytable_k96xlhe3nxahsdgi2xyf @@ -4470,7 +4470,7 @@

Vectorized sty
-

+
@@ -4509,12 +4509,12 @@

Vectorized sty @@ -4620,10 +4620,10 @@

Lines (borders)

- tinytable_zadyys92nedaoiupm405 + tinytable_jct2uchurm25ki6zmkcx @@ -4641,7 +4641,7 @@

Lines (borders)

-
+
@@ -4687,12 +4687,12 @@

Lines (borders)

@@ -4751,12 +4751,12 @@

Lines (borders)

- tinytable_naqye7q7aax9y2tp3x3q + tinytable_zmma9q4yaqwdmpo75wuq @@ -4774,7 +4774,7 @@

Lines (borders)

-
+
@@ -4820,12 +4820,12 @@

Lines (borders)

@@ -4902,9 +4902,9 @@

Inserting image - tinytable_8y2whh3fq1cd8fg01w90 + tinytable_t62vggcz97n8jyrhv4ut @@ -4922,7 +4922,7 @@

Inserting image
-

+
@@ -4945,12 +4945,12 @@

Inserting image @@ -4980,10 +4980,10 @@

Inserting image - tinytable_8x6567f46pfan6t0sg30 + tinytable_a2q1zx2fbl0jhbk3re63 @@ -5001,7 +5001,7 @@

Inserting image
-

+
@@ -5018,12 +5018,12 @@

Inserting image @@ -5075,10 +5075,10 @@

Built-in plots

- tinytable_2byfjpwojd4wqkvdj3n0 + tinytable_y09o54iz8nxhnfasi2fp @@ -5096,7 +5096,7 @@

Built-in plots

-
+
@@ -5110,33 +5110,33 @@

Built-in plots

- - - + + + - - - + + + - - - + + +
mpg
hp
qsec
@@ -5190,9 +5190,9 @@

Custom plots: Base - tinytable_d52e9vjg113mrbifr4zv + tinytable_vnyvkrhlmqwcg1fa0x4u @@ -5210,7 +5210,7 @@

Custom plots: Base - +
@@ -5222,27 +5222,27 @@

Custom plots: Base

- + - + - +
mpg
hp
qsec
@@ -5286,9 +5286,9 @@

Custom plots: g - tinytable_c3233dnft2w9kqb1m8s9 + tinytable_ee8dhsh55hh15269fh31 @@ -5306,7 +5306,7 @@

Custom plots: g
- +
@@ -5318,27 +5318,27 @@

Custom plots: g

- + - + - +
mpg
hp
qsec
@@ -5396,10 +5396,10 @@

Custom plots: g - tinytable_7fhtki94hxk87ht447nq + tinytable_n2xtbj9n4gf279riydd2 @@ -5417,7 +5417,7 @@

Custom plots: g
- +
@@ -5431,33 +5431,33 @@

Custom plots: g

- - - + + + - - - + + + - - - + + +
Adelie
Chinstrap
Gentoo
@@ -5511,11 +5511,11 @@

Rows

- tinytable_xa1jqzmppbmrc695esda + tinytable_t6onb8x66wf4kp3yv2nc @@ -5533,7 +5533,7 @@

Rows

- +
@@ -5644,12 +5644,12 @@

Rows

@@ -5712,12 +5712,12 @@

Rows

- tinytable_ldoxpc16fn3xntqcn8me + tinytable_ktl61pknhsattzhi6pxi @@ -5735,7 +5735,7 @@

Rows

-
+
@@ -5846,12 +5846,12 @@

Rows

@@ -5935,9 +5935,9 @@

Columns

- tinytable_du2jpkmew1snpsorp2h7 + tinytable_jte3tsojw6bxwu1wlpm1 @@ -5955,7 +5955,7 @@

Columns

-
+
@@ -6071,12 +6071,12 @@

Columns

@@ -6122,13 +6122,13 @@

Columns

- tinytable_zrprg8qudlp80hsj9cl4 + tinytable_cig0fv47c1ir98ivt65l @@ -6146,7 +6146,7 @@

Columns

-
Hamburgers Halloumi
+
@@ -6262,12 +6262,12 @@

Columns

@@ -6358,10 +6358,10 @@

Bootstrap classes

- tinytable_rfu3nraqg7kot5vaqp8v + tinytable_w22qogvp1mibjuc8cxod @@ -6379,7 +6379,7 @@

Bootstrap classes

-
Hamburgers Halloumi
+
@@ -6425,12 +6425,12 @@

Bootstrap classes

@@ -6480,10 +6480,10 @@

Bootstrap classes

- tinytable_0hu6myc5962rbtdh3ujc + tinytable_458em7x4q27b9qfe2x4t @@ -6501,7 +6501,7 @@

Bootstrap classes

-
+
@@ -6547,12 +6547,12 @@

Bootstrap classes

@@ -6605,10 +6605,10 @@

CSS declarations

- tinytable_dc1oingqd69kpigeajnm + tinytable_n8hd1mamly021a431cid @@ -6626,7 +6626,7 @@

CSS declarations

-
+
@@ -6672,12 +6672,12 @@

CSS declarations

@@ -6751,10 +6751,10 @@

CSS rules

- tinytable_t2n98dfhdx85o3odqe8e + tinytable_0xzuerotnrkyfhvo45qc