diff --git a/man/format_tt.html b/man/format_tt.html index 14eba684..b78ea526 100644 --- a/man/format_tt.html +++ b/man/format_tt.html @@ -423,9 +423,9 @@

Examples

- tinytable_oinr3cjzfrxc8pw3ttj5 + tinytable_s19tosc6vsfblbvc53sz @@ -443,7 +443,7 @@

Examples

- +
@@ -455,11 +455,11 @@

Examples

- + - + @@ -470,12 +470,12 @@

Examples

diff --git a/man/tt.html b/man/tt.html index 37221126..e44102ed 100644 --- a/man/tt.html +++ b/man/tt.html @@ -396,9 +396,9 @@

Examples

- tinytable_u3xi9brcf9s5xuclaa39 + tinytable_5j4i3uxbt6rjkbo61z9a @@ -416,7 +416,7 @@

Examples

-
10 00010 000 9 999
9 999 10 001 9 999
10 001
+
@@ -462,12 +462,12 @@

Examples

@@ -496,9 +496,9 @@

Examples

- tinytable_lwspmeaspjz3bv8n35i3 + tinytable_1ynjp32pzyxp6yq176x1 @@ -516,7 +516,7 @@

Examples

-
+
@@ -562,12 +562,12 @@

Examples

diff --git a/search.json b/search.json index 84c65e2d..aac11bd2 100644 --- a/search.json +++ b/search.json @@ -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 <- format_tt(dat,\n digits = 2,\n num_mark_dec = \",\",\n num_mark_big = \" \")\ntt(tab)\n\n \n\n \n \n \n tinytable_oinr3cjzfrxc8pw3ttj5\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n \n \n \n \n \n 10 000\n 10 000\n \n \n 9 999\n 10 001\n \n \n 10 001\n 10 001" + "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 <- format_tt(dat,\n digits = 2,\n num_mark_dec = \",\",\n num_mark_big = \" \")\ntt(tab)\n\n \n\n \n \n \n tinytable_s19tosc6vsfblbvc53sz\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n \n \n \n \n \n 10 000\n 9 999\n \n \n 10 001\n 9 999\n \n \n 10 001\n 10 001" }, { "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 <- format_tt(dat,\n digits = 2,\n num_mark_dec = \",\",\n num_mark_big = \" \")\ntt(tab)\n\n \n\n \n \n \n tinytable_oinr3cjzfrxc8pw3ttj5\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n \n \n \n \n \n 10 000\n 10 000\n \n \n 9 999\n 10 001\n \n \n 10 001\n 10 001" + "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 <- format_tt(dat,\n digits = 2,\n num_mark_dec = \",\",\n num_mark_big = \" \")\ntt(tab)\n\n \n\n \n \n \n tinytable_s19tosc6vsfblbvc53sz\n \n \n \n \n \n\n \n \n \n \n \n \n a\n b\n \n \n \n \n \n 10 000\n 9 999\n \n \n 10 001\n 9 999\n \n \n 10 001\n 10 001" }, { "objectID": "man/plot_tt.html", @@ -187,7 +187,7 @@ "href": "man/tt.html", "title": "tinytable", "section": "", - "text": "The tt function renders a table in different formats (HTML, Markdown, or LaTeX) with various styling options. 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\nsave_tt() to save the table to a file or return the table as a string.\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 formating 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\nA single string or a (named) list of strings to append at the bottom of the table.\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.\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_u3xi9brcf9s5xuclaa39\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_lwspmeaspjz3bv8n35i3\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", + "text": "The tt function renders a table in different formats (HTML, Markdown, or LaTeX) with various styling options. 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\nsave_tt() to save the table to a file or return the table as a string.\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 formating 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\nA single string or a (named) list of strings to append at the bottom of the table.\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.\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_5j4i3uxbt6rjkbo61z9a\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_1ynjp32pzyxp6yq176x1\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", "crumbs": [ "Tutorial (HTML)", "Functions", @@ -199,7 +199,7 @@ "href": "man/tt.html#draw-a-tiny-table", "title": "tinytable", "section": "", - "text": "The tt function renders a table in different formats (HTML, Markdown, or LaTeX) with various styling options. 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\nsave_tt() to save the table to a file or return the table as a string.\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 formating 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\nA single string or a (named) list of strings to append at the bottom of the table.\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.\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_u3xi9brcf9s5xuclaa39\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_lwspmeaspjz3bv8n35i3\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", + "text": "The tt function renders a table in different formats (HTML, Markdown, or LaTeX) with various styling options. 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\nsave_tt() to save the table to a file or return the table as a string.\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 formating 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\nA single string or a (named) list of strings to append at the bottom of the table.\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.\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_5j4i3uxbt6rjkbo61z9a\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_1ynjp32pzyxp6yq176x1\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", "crumbs": [ "Tutorial (HTML)", "Functions", @@ -279,7 +279,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_s51319k5o5lkymx5weta\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_yquqordfankyt42n4dms\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_lse28p59qzb8re7odrwo\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_9x6xcfhd7p427tz1obhy\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_tfvy73r2xiaoo3vmkxub\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_f08895wzt3bscv9x52gi\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)" ] @@ -289,7 +289,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_zgaix190qsiyomlv06tw\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_a74mxskbxlt2b7l19zkw\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_iz8mv43pmskwrzjqbd6u\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_ewbdtrvzuakzydic8lap\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)" ] @@ -299,7 +299,7 @@ "href": "vignettes/tutorial.html#formatting-numbers-dates-strings-etc.", "title": "tinytable", "section": "Formatting (numbers, dates, strings, etc.)", - "text": "Formatting (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_4dul5jg312bib1heji9s\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-08-11\n True\n \n \n 201399\n 201.40\n 1970-12-07\n True\n \n \n 100188\n 0.13\n 1972-09-05\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_hhyuozp9udpc2e3ngqcj\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 August 11 1970\n True\n \n \n 201 399,18\n 201.4\n December 07 1970\n True\n \n \n 100 188,39\n 0.1\n September 05 1972\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_q4t0j9jb2pyq6qdwnyy6\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": "Formatting (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_72g13dnwhg8m4sybh6mp\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 1971-05-18\n True\n \n \n 201399\n 201.40\n 1972-02-03\n True\n \n \n 100188\n 0.13\n 1970-04-14\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_7txtxc0ajtrcuulzk6qo\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 May 18 1971\n True\n \n \n 201 399,18\n 201.4\n February 03 1972\n True\n \n \n 100 188,39\n 0.1\n April 14 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_g1gqt7n5eitzsk9pjnpf\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)" ] @@ -309,7 +309,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_b76nrtevmsuesjhy0tkl\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_h1y0oig78bcgq7dpyusy\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_8ergemucsmjtl2hj76yv\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_7ep3g432y781pmt06hyw\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)" ] @@ -319,7 +319,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\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)\ntt(lorem, width = 3/4)\n\n \n\n \n \n \n tinytable_upmixa2il16hsmhooduq\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_9s7yq1nootfs6cto6b33\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\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)\ntt(lorem, width = 3/4)\n\n \n\n \n \n \n tinytable_zlt41j4bbn6m8t7gpw0n\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_gy6aw7j86afdln4j9yj8\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)" ] @@ -329,7 +329,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_7a915yybmnx5ur35pe3w\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_ihhfoca4dardm83u4x0u\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)" ] @@ -339,7 +339,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\ntt(lorem, notes = n, width = 1)\n\n \n\n \n \n \n tinytable_r28ertdzzf9ihf14d5mu\n \n \n \n \n \n\n \n \n A full-width table with wrapped text in cells and a footnote.\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\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_bbwxp4jtvhep6ymnmspp\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", + "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\ntt(lorem, notes = n, width = 1)\n\n \n\n \n \n \n tinytable_uqtw9gdkpp8asvock9jg\n \n \n \n \n \n\n \n \n A full-width table with wrapped text in cells and a footnote.\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\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_jc4byqizx9gr6hr2umta\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", "crumbs": [ "Tutorial (HTML)" ] @@ -349,7 +349,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_z7ldxzr5t0c9g212tcfe\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_qtm3lenrbpqgoo7cim7k\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)" ] @@ -359,7 +359,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_dfkdqmv7sf4bx0250c83\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_hrn4y5p7g6k2uximgy7b\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_760d1x9nme0v94mb0wns\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_2yshoqvdg2bl6gfdpwo0\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)" ] @@ -369,7 +369,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_49tjqj7ifcxjxs6s4xqg\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_45482y266nqfwrryb0x0\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_p0yq0isl4rdwoogeegz1\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_zqv95vkk64xjz0na4zuk\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_7or67ce10f7wigqeaiyh\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_j30ypv6vsqyio6gr9zvb\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_2x8i4ahvp07r27a7exea\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_z86jebnxxjzavsamgcj5\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_af1ri07j2kn7nwb4ks8w\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_n2ewpznocm329f6w9d9c\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_2qqxbwnpouyvb8p6ww3h\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_3s1p71egfrn12id1op76\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_8phvf0l27kna3g0wjne3\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_fi1lwvd274cs3vf3dz1d\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)" ] @@ -379,7 +379,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_vbqrdu12dxnlgitrt5wj\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_ihdxht1t3iupfnm716ud\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)" ] @@ -389,7 +389,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_0epi977jsk3u4ndd4xzk\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_e1b48rbzq0axd7cy1dkr\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)" ] @@ -399,7 +399,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_vcmp4gzo1bpuawadbwf6\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_lr24ygf84ooj1bvyrvbk\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_klvqfxgejew73or40qf4\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_w7h0zko2ztywknrtbbo0\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_6dumbcx46m3eoqr5imw6\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_kh3vlkcm6c42qkln8m3e\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)" ] @@ -409,7 +409,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_vau0oeo1kg2kmugyw2i6\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_2qm57f6s62tzdynmz3z5\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)" ] @@ -419,7 +419,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_3j7moqnlmokxgz6ggeoe\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_5c1d3jicd6f7iskc44di\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_k4q57hgz9lpw81frb06o\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_6txxvo0cclhe7kmax3v3\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_qramv8b4sg8x60cnc0z9\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_16v92gd4pl9im46x2a9s\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)" ] @@ -429,7 +429,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_wsgahz4gy48apqm2zsyt\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_euborrl3fw4ktqkdapvi\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_ms8g9t7ja5c5dslt7x3h\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_pkoa2n894v2f6tsz2wli\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)" ] @@ -439,7 +439,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 \"../man/figures/spider.png\",\n \"../man/figures/squirrel.png\"\n)\n\ntt(dat) |>\n plot_tt(j = 2, images = img, height = 3)\n\n \n\n \n \n \n tinytable_dflzaugd0hmu1yasgjgg\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_h3tf5j74vng1p0kruir5\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 \"../man/figures/spider.png\",\n \"../man/figures/squirrel.png\"\n)\n\ntt(dat) |>\n plot_tt(j = 2, images = img, height = 3)\n\n \n\n \n \n \n tinytable_817c11x8m4kf6ijcg5tc\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_tks0fjj0b3307uzk6z74\n \n \n \n \n \n\n \n \n \n \n \n \n R", "crumbs": [ "Tutorial (HTML)" ] @@ -449,7 +449,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_30h8eepr2jtdx5mgidh8\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_d5ahhiswkx28shjt359h\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_fm15kaq6ddtheb0b0z6j\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_yiqnk51j735llwa9unv1\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_sbazc68vwn2ozrme13zo\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_7agus0sidr91o9bhc8p6\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_wcn1gcgw06drxah9mr9m\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_vyvk13myjeoe0abhiubm\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)" ] @@ -459,7 +459,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_9ftgmybenwx3rgvn1ho2\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_1eubgcto7xeo33vuiw78\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_82fcfytmlsk4tkxlfaq3\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_mq5axf15jqdd2sbm0w48\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)" ] @@ -469,7 +469,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_opxox2ouzxncowjwguku\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_cc05tt5urfn9fsps5nr3\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_phxyi0dpak6eivdiy7p0\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_dcsj4c8wmsryus2ai9fq\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)" ] @@ -479,7 +479,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_96c4x3j7vmv4padbll0d\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_u1229kvi7cvyl62r097d\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_f4kvfahj54dg2l6vr5u9\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_c7on7qo18hsc3y9wf7ar\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)" ] @@ -489,7 +489,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_j79cgrt6tl4xwvgb8cwj\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_3ajrkdtqp1zl006zra0u\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)" ] @@ -499,7 +499,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_ckm33acggd48o9a5r3zp\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_c4zc119udbyi1tc72pby\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)" ] diff --git a/vignettes/tinytable_assets/id0s921tt6z68ggxgw252u.png b/vignettes/tinytable_assets/id0s921tt6z68ggxgw252u.png new file mode 100644 index 00000000..82861ab5 Binary files /dev/null and b/vignettes/tinytable_assets/id0s921tt6z68ggxgw252u.png differ diff --git a/vignettes/tinytable_assets/id2jzrrzigum0w3p3qghei.png b/vignettes/tinytable_assets/id2jzrrzigum0w3p3qghei.png new file mode 100644 index 00000000..04b900e8 Binary files /dev/null and b/vignettes/tinytable_assets/id2jzrrzigum0w3p3qghei.png differ diff --git a/vignettes/tinytable_assets/id3950va4mc403ppp91c8z.png b/vignettes/tinytable_assets/id3950va4mc403ppp91c8z.png new file mode 100644 index 00000000..5e33c88b Binary files /dev/null and b/vignettes/tinytable_assets/id3950va4mc403ppp91c8z.png differ diff --git a/vignettes/tinytable_assets/id404v0g3c6fqmwyabx4p8.png b/vignettes/tinytable_assets/id404v0g3c6fqmwyabx4p8.png new file mode 100644 index 00000000..b6cc9f62 Binary files /dev/null and b/vignettes/tinytable_assets/id404v0g3c6fqmwyabx4p8.png differ diff --git a/vignettes/tinytable_assets/id51snh0g09bdpr9u4e4d0.png b/vignettes/tinytable_assets/id51snh0g09bdpr9u4e4d0.png new file mode 100644 index 00000000..3f008627 Binary files /dev/null and b/vignettes/tinytable_assets/id51snh0g09bdpr9u4e4d0.png differ diff --git a/vignettes/tinytable_assets/id7ixslb6i6vpa7ju7h5d9.png b/vignettes/tinytable_assets/id7ixslb6i6vpa7ju7h5d9.png new file mode 100644 index 00000000..bfc66e8f Binary files /dev/null and b/vignettes/tinytable_assets/id7ixslb6i6vpa7ju7h5d9.png differ diff --git a/vignettes/tinytable_assets/id7v3g4omjppmdfe7b1f04.png b/vignettes/tinytable_assets/id7v3g4omjppmdfe7b1f04.png new file mode 100644 index 00000000..79205456 Binary files /dev/null and b/vignettes/tinytable_assets/id7v3g4omjppmdfe7b1f04.png differ diff --git a/vignettes/tinytable_assets/id9fhef0777486rwjoc50n.png b/vignettes/tinytable_assets/id9fhef0777486rwjoc50n.png new file mode 100644 index 00000000..79a35013 Binary files /dev/null and b/vignettes/tinytable_assets/id9fhef0777486rwjoc50n.png differ diff --git a/vignettes/tinytable_assets/idafwivgywf2kgwrbgte7p.png b/vignettes/tinytable_assets/idafwivgywf2kgwrbgte7p.png new file mode 100644 index 00000000..b6465812 Binary files /dev/null and b/vignettes/tinytable_assets/idafwivgywf2kgwrbgte7p.png differ diff --git a/vignettes/tinytable_assets/iddtrqjj5mikpm7bljoyqe.png b/vignettes/tinytable_assets/iddtrqjj5mikpm7bljoyqe.png new file mode 100644 index 00000000..2a3649f8 Binary files /dev/null and b/vignettes/tinytable_assets/iddtrqjj5mikpm7bljoyqe.png differ diff --git a/vignettes/tinytable_assets/idikxpt11xyh49q7awqdly.png b/vignettes/tinytable_assets/idikxpt11xyh49q7awqdly.png new file mode 100644 index 00000000..4e1ff0a7 Binary files /dev/null and b/vignettes/tinytable_assets/idikxpt11xyh49q7awqdly.png differ diff --git a/vignettes/tinytable_assets/idjtjnaf62awwigdle57ch.png b/vignettes/tinytable_assets/idjtjnaf62awwigdle57ch.png new file mode 100644 index 00000000..e0b2cddc Binary files /dev/null and b/vignettes/tinytable_assets/idjtjnaf62awwigdle57ch.png differ diff --git a/vignettes/tinytable_assets/idko7j28lphimd0sukmbmd.png b/vignettes/tinytable_assets/idko7j28lphimd0sukmbmd.png new file mode 100644 index 00000000..5e2927f9 Binary files /dev/null and b/vignettes/tinytable_assets/idko7j28lphimd0sukmbmd.png differ diff --git a/vignettes/tinytable_assets/idl6kjyxt86rvwrbpijkkh.png b/vignettes/tinytable_assets/idl6kjyxt86rvwrbpijkkh.png new file mode 100644 index 00000000..0e9656bb Binary files /dev/null and b/vignettes/tinytable_assets/idl6kjyxt86rvwrbpijkkh.png differ diff --git a/vignettes/tinytable_assets/idlbyyabr05deyqtzgu9kj.png b/vignettes/tinytable_assets/idlbyyabr05deyqtzgu9kj.png new file mode 100644 index 00000000..f3f966d9 Binary files /dev/null and b/vignettes/tinytable_assets/idlbyyabr05deyqtzgu9kj.png differ diff --git a/vignettes/tinytable_assets/idn2og0k3qnpcbsmpl04bi.png b/vignettes/tinytable_assets/idn2og0k3qnpcbsmpl04bi.png new file mode 100644 index 00000000..8ec24e8d Binary files /dev/null and b/vignettes/tinytable_assets/idn2og0k3qnpcbsmpl04bi.png differ diff --git a/vignettes/tinytable_assets/idnjoctjk5ol5dleofuruo.png b/vignettes/tinytable_assets/idnjoctjk5ol5dleofuruo.png new file mode 100644 index 00000000..ad809c1c Binary files /dev/null and b/vignettes/tinytable_assets/idnjoctjk5ol5dleofuruo.png differ diff --git a/vignettes/tinytable_assets/idnt3ixannah1y52xqjb4t.png b/vignettes/tinytable_assets/idnt3ixannah1y52xqjb4t.png new file mode 100644 index 00000000..95e77745 Binary files /dev/null and b/vignettes/tinytable_assets/idnt3ixannah1y52xqjb4t.png differ diff --git a/vignettes/tinytable_assets/idp1u3ekdcifi1w0f7yh88.png b/vignettes/tinytable_assets/idp1u3ekdcifi1w0f7yh88.png new file mode 100644 index 00000000..d7222e0f Binary files /dev/null and b/vignettes/tinytable_assets/idp1u3ekdcifi1w0f7yh88.png differ diff --git a/vignettes/tinytable_assets/idqnroaryukyconofg5m9q.png b/vignettes/tinytable_assets/idqnroaryukyconofg5m9q.png new file mode 100644 index 00000000..fa8a2afc Binary files /dev/null and b/vignettes/tinytable_assets/idqnroaryukyconofg5m9q.png differ diff --git a/vignettes/tinytable_assets/idritvfhnndd2bukbwf5hi.png b/vignettes/tinytable_assets/idritvfhnndd2bukbwf5hi.png new file mode 100644 index 00000000..80279d32 Binary files /dev/null and b/vignettes/tinytable_assets/idritvfhnndd2bukbwf5hi.png differ diff --git a/vignettes/tinytable_assets/idt3jz0u34xob9y5r8eotq.png b/vignettes/tinytable_assets/idt3jz0u34xob9y5r8eotq.png new file mode 100644 index 00000000..8eaafeb9 Binary files /dev/null and b/vignettes/tinytable_assets/idt3jz0u34xob9y5r8eotq.png differ diff --git a/vignettes/tinytable_assets/idv64049jtlsvhtulzid70.png b/vignettes/tinytable_assets/idv64049jtlsvhtulzid70.png new file mode 100644 index 00000000..0ba387fc Binary files /dev/null and b/vignettes/tinytable_assets/idv64049jtlsvhtulzid70.png differ diff --git a/vignettes/tinytable_assets/idyf1dvmndzbbonxtm5gap.png b/vignettes/tinytable_assets/idyf1dvmndzbbonxtm5gap.png new file mode 100644 index 00000000..6cee967b Binary files /dev/null and b/vignettes/tinytable_assets/idyf1dvmndzbbonxtm5gap.png differ diff --git a/vignettes/tutorial.html b/vignettes/tutorial.html index e7ca8041..f0fbb9cc 100644 --- a/vignettes/tutorial.html +++ b/vignettes/tutorial.html @@ -357,9 +357,9 @@

Tiny Tables

- tinytable_tki3kw1dkaaw0605mqvt + tinytable_sh9apoazybrbgtuhdaus @@ -377,7 +377,7 @@

Tiny Tables

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

Tiny Tables

@@ -535,9 +535,9 @@

Themes

- tinytable_s51319k5o5lkymx5weta + tinytable_9x6xcfhd7p427tz1obhy @@ -555,7 +555,7 @@

Themes

-
+
@@ -601,12 +601,12 @@

Themes

@@ -649,9 +649,9 @@

Themes

- tinytable_yquqordfankyt42n4dms + tinytable_tfvy73r2xiaoo3vmkxub @@ -669,7 +669,7 @@

Themes

-
+
@@ -715,12 +715,12 @@

Themes

@@ -763,9 +763,9 @@

Themes

- tinytable_lse28p59qzb8re7odrwo + tinytable_f08895wzt3bscv9x52gi @@ -783,7 +783,7 @@

Themes

-
+
@@ -829,12 +829,12 @@

Themes

@@ -886,10 +886,10 @@

Alignment

- tinytable_zgaix190qsiyomlv06tw + tinytable_iz8mv43pmskwrzjqbd6u @@ -907,7 +907,7 @@

Alignment

-
+
@@ -938,12 +938,12 @@

Alignment

@@ -979,12 +979,12 @@

Alignment

- tinytable_a74mxskbxlt2b7l19zkw + tinytable_ewbdtrvzuakzydic8lap @@ -1002,7 +1002,7 @@

Alignment

-
+
@@ -1033,12 +1033,12 @@

Alignment

@@ -1087,9 +1087,9 @@

Form - tinytable_4dul5jg312bib1heji9s + tinytable_72g13dnwhg8m4sybh6mp @@ -1107,7 +1107,7 @@

Form
-

+
@@ -1122,19 +1122,19 @@

Form

- + - + - + @@ -1142,12 +1142,12 @@

Form @@ -1185,9 +1185,9 @@

Form - tinytable_hhyuozp9udpc2e3ngqcj + tinytable_7txtxc0ajtrcuulzk6qo @@ -1205,7 +1205,7 @@

Form
-

143002 1.431970-08-111971-05-18 True
201399 201.401970-12-071972-02-03 True
100188 0.131972-09-051970-04-14 False
+
@@ -1220,19 +1220,19 @@

Form

- + - + - + @@ -1240,12 +1240,12 @@

Form @@ -1280,9 +1280,9 @@

Form - tinytable_q4t0j9jb2pyq6qdwnyy6 + tinytable_g1gqt7n5eitzsk9pjnpf @@ -1300,7 +1300,7 @@

Form
-

143 002,21 1.4August 11 1970May 18 1971 True
201 399,18 201.4December 07 1970February 03 1972 True
100 188,39 0.1September 05 1972April 14 1970 False
+
@@ -1336,12 +1336,12 @@

Form @@ -1386,9 +1386,9 @@

Width

- tinytable_b76nrtevmsuesjhy0tkl + tinytable_8ergemucsmjtl2hj76yv @@ -1406,7 +1406,7 @@

Width

-
+
@@ -1452,12 +1452,12 @@

Width

@@ -1485,9 +1485,9 @@

Width

- tinytable_h1y0oig78bcgq7dpyusy + tinytable_7ep3g432y781pmt06hyw @@ -1505,7 +1505,7 @@

Width

-
+
@@ -1551,12 +1551,12 @@

Width

@@ -1592,9 +1592,9 @@

Line breaks - tinytable_upmixa2il16hsmhooduq + tinytable_zlt41j4bbn6m8t7gpw0n @@ -1612,7 +1612,7 @@

Line breaks
-

+

A full width table with wrapped text.

@@ -1631,12 +1631,12 @@

Line breaks @@ -1666,9 +1666,9 @@

Line breaks - tinytable_9s7yq1nootfs6cto6b33 + tinytable_gy6aw7j86afdln4j9yj8 @@ -1686,7 +1686,7 @@

Line breaks
-

A full width table with wrapped text.

+
@@ -1705,12 +1705,12 @@

Line breaks @@ -1756,9 +1756,9 @@

Captions and - tinytable_7a915yybmnx5ur35pe3w + tinytable_ihhfoca4dardm83u4x0u @@ -1776,7 +1776,7 @@

Captions and
-

+
@@ -1817,12 +1817,12 @@

Captions and @@ -1863,9 +1863,9 @@

Footnotes

- tinytable_r28ertdzzf9ihf14d5mu + tinytable_uqtw9gdkpp8asvock9jg @@ -1883,7 +1883,7 @@

Footnotes

-
+

A full-width table with wrapped text in cells and a footnote.

@@ -1902,12 +1902,12 @@

Footnotes

@@ -1933,9 +1933,9 @@

Footnotes

- tinytable_bbwxp4jtvhep6ymnmspp + tinytable_jc4byqizx9gr6hr2umta @@ -1953,7 +1953,7 @@

Footnotes

-

A full-width table with wrapped text in cells and a footnote.

+
@@ -2000,12 +2000,12 @@

Footnotes

@@ -2041,10 +2041,10 @@

Math

- tinytable_z7ldxzr5t0c9g212tcfe + tinytable_qtm3lenrbpqgoo7cim7k @@ -2062,7 +2062,7 @@

Math

-
+
@@ -2082,12 +2082,12 @@

Math

@@ -2125,10 +2125,10 @@

Markdown

- tinytable_dfkdqmv7sf4bx0250c83 + tinytable_760d1x9nme0v94mb0wns @@ -2146,7 +2146,7 @@

Markdown

-
+
@@ -2166,12 +2166,12 @@

Markdown

@@ -2229,9 +2229,9 @@

Markdown

- tinytable_hrn4y5p7g6k2uximgy7b + tinytable_2yshoqvdg2bl6gfdpwo0 @@ -2249,7 +2249,7 @@

Markdown

-
+

Vincent sometimes contributes to these R packages.

@@ -2308,12 +2308,12 @@

Markdown

@@ -2372,10 +2372,10 @@

Cells, rows, columns - tinytable_49tjqj7ifcxjxs6s4xqg + tinytable_z86jebnxxjzavsamgcj5 @@ -2393,7 +2393,7 @@

Cells, rows, columns -

Vincent sometimes contributes to these R packages.

+
@@ -2439,12 +2439,12 @@

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

Cells, rows, columns - tinytable_45482y266nqfwrryb0x0 + tinytable_af1ri07j2kn7nwb4ks8w @@ -2500,7 +2500,7 @@

Cells, rows, columns -

+
@@ -2546,12 +2546,12 @@

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

Cells, rows, columns - tinytable_p0yq0isl4rdwoogeegz1 + tinytable_n2ewpznocm329f6w9d9c @@ -2607,7 +2607,7 @@

Cells, rows, columns -

+
@@ -2653,12 +2653,12 @@

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

Cells, rows, columns - tinytable_zqv95vkk64xjz0na4zuk + tinytable_2qqxbwnpouyvb8p6ww3h @@ -2728,7 +2728,7 @@

Cells, rows, columns -

+
@@ -2774,12 +2774,12 @@

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

Cells, rows, columns - tinytable_7or67ce10f7wigqeaiyh + tinytable_3s1p71egfrn12id1op76 @@ -2839,7 +2839,7 @@

Cells, rows, columns -

+
@@ -2885,12 +2885,12 @@

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

Cells, rows, columns - tinytable_j30ypv6vsqyio6gr9zvb + tinytable_8phvf0l27kna3g0wjne3 @@ -2950,7 +2950,7 @@

Cells, rows, columns -

+
@@ -2996,12 +2996,12 @@

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

Cells, rows, columns - tinytable_2x8i4ahvp07r27a7exea + tinytable_fi1lwvd274cs3vf3dz1d @@ -3064,7 +3064,7 @@

Cells, rows, columns -

+
@@ -3110,12 +3110,12 @@

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

Colors

- tinytable_vbqrdu12dxnlgitrt5wj + tinytable_ihdxht1t3iupfnm716ud @@ -3185,7 +3185,7 @@

Colors

-
+
@@ -3231,12 +3231,12 @@

Colors

@@ -3273,10 +3273,10 @@

Fonts

- tinytable_0epi977jsk3u4ndd4xzk + tinytable_e1b48rbzq0axd7cy1dkr @@ -3294,7 +3294,7 @@

Fonts

-
+
@@ -3340,12 +3340,12 @@

Fonts

@@ -3389,9 +3389,9 @@

Headers

- tinytable_vcmp4gzo1bpuawadbwf6 + tinytable_w7h0zko2ztywknrtbbo0 @@ -3409,7 +3409,7 @@

Headers

-
+
@@ -3448,12 +3448,12 @@

Headers

@@ -3482,10 +3482,10 @@

Headers

- tinytable_lr24ygf84ooj1bvyrvbk + tinytable_6dumbcx46m3eoqr5imw6 @@ -3503,7 +3503,7 @@

Headers

-
+
@@ -3549,12 +3549,12 @@

Headers

@@ -3588,10 +3588,10 @@

Headers

- tinytable_klvqfxgejew73or40qf4 + tinytable_kh3vlkcm6c42qkln8m3e @@ -3609,7 +3609,7 @@

Headers

-
+
@@ -3655,12 +3655,12 @@

Headers

@@ -3708,10 +3708,10 @@

Conditional styling - tinytable_vau0oeo1kg2kmugyw2i6 + tinytable_2qm57f6s62tzdynmz3z5 @@ -3729,7 +3729,7 @@

Conditional styling -

+
@@ -3795,12 +3795,12 @@

Conditional styling @@ -3842,13 +3842,13 @@

Vectorized sty - tinytable_3j7moqnlmokxgz6ggeoe + tinytable_6txxvo0cclhe7kmax3v3 @@ -3866,7 +3866,7 @@

Vectorized sty
-

+
@@ -3912,12 +3912,12 @@

Vectorized sty @@ -3970,11 +3970,11 @@

Vectorized sty - tinytable_5c1d3jicd6f7iskc44di + tinytable_qramv8b4sg8x60cnc0z9 @@ -3992,7 +3992,7 @@

Vectorized sty
-

+
@@ -4038,12 +4038,12 @@

Vectorized sty @@ -4101,30 +4101,30 @@

Vectorized sty - tinytable_k4q57hgz9lpw81frb06o + tinytable_16v92gd4pl9im46x2a9s @@ -4142,7 +4142,7 @@

Vectorized sty
-

+
@@ -4181,12 +4181,12 @@

Vectorized sty @@ -4292,10 +4292,10 @@

Lines (borders)

- tinytable_wsgahz4gy48apqm2zsyt + tinytable_ms8g9t7ja5c5dslt7x3h @@ -4313,7 +4313,7 @@

Lines (borders)

-
+
@@ -4359,12 +4359,12 @@

Lines (borders)

@@ -4423,12 +4423,12 @@

Lines (borders)

- tinytable_euborrl3fw4ktqkdapvi + tinytable_pkoa2n894v2f6tsz2wli @@ -4446,7 +4446,7 @@

Lines (borders)

-
+
@@ -4492,12 +4492,12 @@

Lines (borders)

@@ -4574,9 +4574,9 @@

Inserting image - tinytable_dflzaugd0hmu1yasgjgg + tinytable_817c11x8m4kf6ijcg5tc @@ -4594,7 +4594,7 @@

Inserting image
-

+
@@ -4617,12 +4617,12 @@

Inserting image @@ -4652,10 +4652,10 @@

Inserting image - tinytable_h3tf5j74vng1p0kruir5 + tinytable_tks0fjj0b3307uzk6z74 @@ -4673,7 +4673,7 @@

Inserting image
-

+
@@ -4690,12 +4690,12 @@

Inserting image @@ -4747,10 +4747,10 @@

Built-in plots

- tinytable_30h8eepr2jtdx5mgidh8 + tinytable_sbazc68vwn2ozrme13zo @@ -4768,7 +4768,7 @@

Built-in plots

-
+
@@ -4782,33 +4782,33 @@

Built-in plots

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

Custom plots: Base - tinytable_d5ahhiswkx28shjt359h + tinytable_7agus0sidr91o9bhc8p6 @@ -4882,7 +4882,7 @@

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

Custom plots: Base

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

Custom plots: g - tinytable_fm15kaq6ddtheb0b0z6j + tinytable_wcn1gcgw06drxah9mr9m @@ -4978,7 +4978,7 @@

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

Custom plots: g

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

Custom plots: g - tinytable_yiqnk51j735llwa9unv1 + tinytable_vyvk13myjeoe0abhiubm @@ -5089,7 +5089,7 @@

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

Custom plots: g

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

Rows

- tinytable_9ftgmybenwx3rgvn1ho2 + tinytable_82fcfytmlsk4tkxlfaq3 @@ -5205,7 +5205,7 @@

Rows

- +
@@ -5316,12 +5316,12 @@

Rows

@@ -5384,12 +5384,12 @@

Rows

- tinytable_1eubgcto7xeo33vuiw78 + tinytable_mq5axf15jqdd2sbm0w48 @@ -5407,7 +5407,7 @@

Rows

-
+
@@ -5518,12 +5518,12 @@

Rows

@@ -5607,9 +5607,9 @@

Columns

- tinytable_opxox2ouzxncowjwguku + tinytable_phxyi0dpak6eivdiy7p0 @@ -5627,7 +5627,7 @@

Columns

-
+
@@ -5743,12 +5743,12 @@

Columns

@@ -5794,13 +5794,13 @@

Columns

- tinytable_cc05tt5urfn9fsps5nr3 + tinytable_dcsj4c8wmsryus2ai9fq @@ -5818,7 +5818,7 @@

Columns

-
Hamburgers Halloumi
+
@@ -5934,12 +5934,12 @@

Columns

@@ -6030,10 +6030,10 @@

Bootstrap classes

- tinytable_96c4x3j7vmv4padbll0d + tinytable_f4kvfahj54dg2l6vr5u9 @@ -6051,7 +6051,7 @@

Bootstrap classes

-
Hamburgers Halloumi
+
@@ -6097,12 +6097,12 @@

Bootstrap classes

@@ -6152,10 +6152,10 @@

Bootstrap classes

- tinytable_u1229kvi7cvyl62r097d + tinytable_c7on7qo18hsc3y9wf7ar @@ -6173,7 +6173,7 @@

Bootstrap classes

-
+
@@ -6219,12 +6219,12 @@

Bootstrap classes

@@ -6277,10 +6277,10 @@

CSS declarations

- tinytable_j79cgrt6tl4xwvgb8cwj + tinytable_3ajrkdtqp1zl006zra0u @@ -6298,7 +6298,7 @@

CSS declarations

-
+
@@ -6344,12 +6344,12 @@

CSS declarations

@@ -6423,10 +6423,10 @@

CSS rules

- tinytable_ckm33acggd48o9a5r3zp + tinytable_c4zc119udbyi1tc72pby