Package: gt 0.10.1.9000

Richard Iannone

gt: Easily Create Presentation-Ready Display Tables

Build display tables from tabular data with an easy-to-use set of functions. With its progressive approach, we can construct display tables with a cohesive set of table parts. Table values can be formatted using any of the included formatting functions. Footnotes and cell styles can be precisely added through a location targeting system. The way in which 'gt' handles things for you means that you don't often have to worry about the fine details.

Authors:Richard Iannone [aut, cre], Joe Cheng [aut], Barret Schloerke [aut], Ellis Hughes [aut], Alexandra Lauer [aut], JooYoung Seo [aut], Ken Brevoort [aut], Olivier Roy [aut], Posit Software, PBC [cph, fnd]

gt_0.10.1.9000.tar.gz
gt_0.10.1.9000.zip(r-4.5)gt_0.10.1.9000.zip(r-4.4)gt_0.10.1.9000.zip(r-4.3)
gt_0.10.1.9000.tgz(r-4.4-any)gt_0.10.1.9000.tgz(r-4.3-any)
gt_0.10.1.9000.tar.gz(r-4.5-noble)gt_0.10.1.9000.tar.gz(r-4.4-noble)
gt_0.10.1.9000.tgz(r-4.4-emscripten)gt_0.10.1.9000.tgz(r-4.3-emscripten)
gt.pdf |gt.html
gt/json (API)
NEWS

# Install gt in R:
install.packages('gt', repos = c('https://rstudio.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/rstudio/gt/issues

Datasets:
  • constants - The fundamental physical constants
  • countrypops - Yearly populations of countries from 1960 to 2022
  • exibble - A toy example tibble for testing with gt: exibble
  • films - Feature films in competition at the Cannes Film Festival
  • gibraltar - Weather conditions in Gibraltar, May 2023
  • gtcars - Deluxe automobiles from the 2014-2017 period
  • illness - Lab tests for one suffering from an illness
  • metro - The stations of the Paris Metro
  • nuclides - Nuclide data
  • peeps - A table of personal information for people all over the world
  • photolysis - Data on photolysis rates for gas-phase organic compounds
  • pizzaplace - A year of pizza sales from a pizza place
  • reactions - Reaction rates for gas-phase atmospheric reactions of organic compounds
  • rx_addv - An ADDV-flavored clinical trial toy dataset
  • rx_adsl - An ADSL-flavored clinical trial toy dataset
  • sp500 - Daily S&P 500 Index data from 1950 to 2015
  • sza - Twice hourly solar zenith angles by month & latitude
  • towny - Populations of all municipalities in Ontario from 1996 to 2021

On CRAN:

docxeasy-to-usehtmllatexrtfsummary-tables

188 exports 1.9k stars 11.49 score 56 dependencies 87 dependents 164.6k downloads

Last updated 9 hours agofrom:01e890c7aa91a47c8378c27290e0da158f6a7173

Exports:%>%adjust_luminanceas_gtableas_latexas_raw_htmlas_rtfas_wordcell_borderscell_fillcell_textcells_bodycells_column_labelscells_column_spannerscells_footnotescells_grand_summarycells_groupcells_row_groupscells_source_notescells_stubcells_stub_grand_summarycells_stub_summarycells_stubheadcells_summarycells_titlecols_addcols_aligncols_align_decimalcols_hidecols_labelcols_label_withcols_mergecols_merge_n_pctcols_merge_rangecols_merge_uncertcols_movecols_move_to_endcols_move_to_startcols_nanoplotcols_unhidecols_unitscols_widthcontainscsscurrencydata_colordefault_fontsends_withescape_latexeverythingextract_bodyextract_cellsextract_summaryfmtfmt_autofmt_binsfmt_bytesfmt_chemfmt_countryfmt_currencyfmt_datefmt_datetimefmt_durationfmt_emailfmt_engineeringfmt_flagfmt_fractionfmt_iconfmt_imagefmt_indexfmt_integerfmt_markdownfmt_missingfmt_numberfmt_partsperfmt_passthroughfmt_percentfmt_romanfmt_scientificfmt_spelled_numfmt_tffmt_timefmt_unitsfmt_urlfrom_columnggplot_imagegoogle_fontgrand_summary_rowsgrp_addgrp_clonegrp_optionsgrp_pullgrp_replacegrp_rmgtgt_groupgt_latex_dependenciesgt_outputgt_previewgt_splitgtsavehtmlinfo_currenciesinfo_date_styleinfo_flagsinfo_google_fontsinfo_iconsinfo_localesinfo_paletteerinfo_time_styleinfo_unit_conversionslocal_imagematchesmdnanoplot_optionsnum_rangeone_ofopt_align_table_headeropt_all_capsopt_cssopt_footnote_marksopt_footnote_specopt_horizontal_paddingopt_interactiveopt_row_stripingopt_stylizeopt_table_fontopt_table_linesopt_table_outlineopt_vertical_paddingpctpxrandom_idrender_gtrm_captionrm_footnotesrm_headerrm_source_notesrm_spannersrm_stubheadrow_group_orderrows_addstarts_withstubsub_large_valssub_missingsub_small_valssub_valuessub_zerosummary_rowssystem_fontstab_captiontab_footnotetab_headertab_infotab_optionstab_row_grouptab_source_notetab_spannertab_spanner_delimtab_stub_indenttab_stubheadtab_styletab_style_bodytest_imagetext_case_matchtext_case_whentext_replacetext_transformunit_conversionvarsvec_fmt_bytesvec_fmt_currencyvec_fmt_datevec_fmt_datetimevec_fmt_durationvec_fmt_engineeringvec_fmt_fractionvec_fmt_indexvec_fmt_integervec_fmt_markdownvec_fmt_numbervec_fmt_partspervec_fmt_percentvec_fmt_romanvec_fmt_scientificvec_fmt_spelled_numvec_fmt_timeweb_image

Dependencies:base64encbigDbitopsbslibcachemclicolorspacecommonmarkcurldigestdplyrevaluatefansifarverfastmapfontawesomefsgenericsgluehighrhtmltoolshtmlwidgetsjquerylibjsonlitejuicyjuiceknitrlabelinglifecyclemagrittrmarkdownmemoisemimemunsellpillarpkgconfigR6rappdirsRColorBrewerRcppreactablereactRrlangrmarkdownsassscalestibbletidyselecttinytexutf8V8vctrsviridisLitewithrxfunxml2yaml

Readme and manuals

Help Manual

Help pageTopics
Adjust the luminance for a palette of colorsadjust_luminance
Transform a *gt* table to a 'gtable' objectas_gtable
Output a *gt* object as LaTeXas_latex
Get the HTML content of a *gt* tableas_raw_html
Output a *gt* object as RTFas_rtf
Output a *gt* object as Wordas_word
Helper for defining custom borders for table cellscell_borders
Helper for defining custom fills for table cellscell_fill
Helper for defining custom text styles for table cellscell_text
Location helper for targeting data cells in the table bodycells_body
Location helper for targeting the column labelscells_column_labels
Location helper for targeting the column spannerscells_column_spanners
Location helper for targeting the footnotescells_footnotes
Location helper for targeting cells in a grand summarycells_grand_summary
Location helper for targeting row groupscells_row_groups
Location helper for targeting the source notescells_source_notes
Location helper for targeting cells in the table stubcells_stub
Location helper for targeting the stub cells in a grand summarycells_stub_grand_summary
Location helper for targeting the stub cells in a summarycells_stub_summary
Location helper for targeting the table stubhead cellcells_stubhead
Location helper for targeting group summary cellscells_summary
Location helper for targeting the table title and subtitlecells_title
Add one or more columns to a *gt* tablecols_add
Set the alignment of columnscols_align
Align all numeric values in a column along the decimal markcols_align_decimal
Hide one or more columnscols_hide
Relabel one or more columnscols_label
Relabel columns with a functioncols_label_with
Merge data from two or more columns to a single columncols_merge
Merge two columns to combine counts and percentagescols_merge_n_pct
Merge two columns to a value range columncols_merge_range
Merge columns to a value-with-uncertainty columncols_merge_uncert
Move one or more columnscols_move
Move one or more columns to the endcols_move_to_end
Move one or more columns to the startcols_move_to_start
Add a new column of nanoplots, taking input data from selected columnscols_nanoplot
Unhide one or more columnscols_unhide
Define units for one or more columnscols_units
Set the widths of columnscols_width
The fundamental physical constantsconstants
Yearly populations of countries from 1960 to 2022countrypops
Supply a custom currency symbol to 'fmt_currency()'currency
Perform data cell colorizationdata_color
Provide a vector of sensible system fonts for use with *gt* tablesdefault_fonts
Perform LaTeX escapingescape_latex
A toy example tibble for testing with gt: exibbleexibble
Extract the table body from a *gt* objectextract_body
Extract a vector of formatted cells from a *gt* objectextract_cells
Extract a summary list from a *gt* objectextract_summary
Feature films in competition at the Cannes Film Festivalfilms
Set a column format with a formatter functionfmt
Automatically format column data according to their valuesfmt_auto
Format column data containing bin/interval informationfmt_bins
Format values as bytesfmt_bytes
Format chemical formulasfmt_chem
Generate country names from their corresponding country codesfmt_country
Format values as currenciesfmt_currency
Format values as datesfmt_date
Format values as datetimesfmt_datetime
Format numeric or duration values as styled time duration stringsfmt_duration
Format email addresses to generate 'mailto:' linksfmt_email
Format values to engineering notationfmt_engineering
Generate flag icons for countries from their country codesfmt_flag
Format values as mixed fractionsfmt_fraction
Use icons within a table's body cellsfmt_icon
Format image paths to generate images in cellsfmt_image
Format values to indexed charactersfmt_index
Format values as integersfmt_integer
Format Markdown textfmt_markdown
Format numeric valuesfmt_number
Format values as parts-per quantitiesfmt_partsper
Format by simply passing data throughfmt_passthrough
Format values as a percentagefmt_percent
Format values as Roman numeralsfmt_roman
Format values to scientific notationfmt_scientific
Format values to spelled-out numbersfmt_spelled_num
Format 'TRUE' and 'FALSE' valuesfmt_tf
Format values as timesfmt_time
Format measurement unitsfmt_units
Format URLs to generate linksfmt_url
Reference a column of values for certain parametersfrom_column
Helper function for adding a ggplotggplot_image
Weather conditions in Gibraltar, May 2023gibraltar
Helper function for specifying a font from the _Google Fonts_ servicegoogle_font
Add grand summary rows using aggregation functionsgrand_summary_rows
Add one or more *gt* tables to a 'gt_group' container objectgrp_add
Clone one or more *gt* tables in a 'gt_group' container objectgrp_clone
Modify table options for all tables within a 'gt_group' objectgrp_options
Pull out a *gt* table from a 'gt_group' container objectgrp_pull
Replace one or more *gt* tables in a 'gt_group' container objectgrp_replace
Remove one or more *gt* tables from a 'gt_group' container objectgrp_rm
Create a *gt* table objectgt
Create a 'gt_group' container for holding multiple *gt* table objectsgt_group
Get the LaTeX dependencies required for a *gt* tablegt_latex_dependencies
Create a *gt* display table output element for Shinygt_output
Generate a special *gt* table for previewing a datasetgt_preview
Split a table into a group of tables (a 'gt_group')gt_split
Deluxe automobiles from the 2014-2017 periodgtcars
Save a *gt* table as a filegtsave
Interpret input text as HTML-formatted texthtml
Lab tests for one suffering from an illnessillness
View a table with info on supported currenciesinfo_currencies
View a table with info on date stylesinfo_date_style
View a table with all available flags for 'fmt_flag()'info_flags
View a table on recommended Google Fontsinfo_google_fonts
View a table with all available Font Awesome icons for 'fmt_icon()'info_icons
View a table with info on supported localesinfo_locales
View a table with info on color palettesinfo_paletteer
View a table with info on time stylesinfo_time_style
View a table with all units that can be converted by 'unit_conversion()'info_unit_conversions
Helper function for adding a local imagelocal_image
Interpret input text as Markdown-formatted textmd
The stations of the Paris Metrometro
Supply nanoplot options to 'cols_nanoplot()'nanoplot_options
Nuclide datanuclides
Option to align the table headeropt_align_table_header
Option to use all caps in select table locationsopt_all_caps
Option to add custom CSS for the tableopt_css
Option to modify the set of footnote marksopt_footnote_marks
Option to specify the formatting of footnote marksopt_footnote_spec
Option to expand or contract horizontal paddingopt_horizontal_padding
Option to put interactive elements in an HTML tableopt_interactive
Option to add or remove row stripingopt_row_striping
Stylize your table with a colorful lookopt_stylize
Options to define font choices for the entire tableopt_table_font
Option to set table lines to different extentsopt_table_lines
Option to wrap an outline around the entire tableopt_table_outline
Option to expand or contract vertical paddingopt_vertical_padding
Helper for providing a numeric value as percentagepct
A table of personal information for people all over the worldpeeps
Data on photolysis rates for gas-phase organic compoundsphotolysis
A year of pizza sales from a pizza placepizzaplace
Helper for providing a numeric value as pixels valuepx
Helper for creating a random 'id' for a *gt* tablerandom_id
Reaction rates for gas-phase atmospheric reactions of organic compoundsreactions
A *gt* display table render function for use in Shinyrender_gt
Remove the table captionrm_caption
Remove table footnotesrm_footnotes
Remove the table headerrm_header
Remove table source notesrm_source_notes
Remove column spanner labelsrm_spanners
Remove the stubhead labelrm_stubhead
Modify the ordering of any row groupsrow_group_order
Add one or more rows to a *gt* tablerows_add
An ADDV-flavored clinical trial toy datasetrx_addv
An ADSL-flavored clinical trial toy datasetrx_adsl
Daily S&P 500 Index data from 1950 to 2015sp500
Select helper for targeting the stub columnstub
Substitute large values in the table bodysub_large_vals
Substitute missing values in the table bodysub_missing
Substitute small values in the table bodysub_small_vals
Substitute targeted values in the table bodysub_values
Substitute zero values in the table bodysub_zero
Add group-wise summary rows using aggregation functionssummary_rows
Get a themed font stack that works well across systemssystem_fonts
Twice hourly solar zenith angles by month & latitudesza
Add a table captiontab_caption
Add a table footnotetab_footnote
Add a table headertab_header
Understand what's been set inside of a *gt* table objecttab_info
Modify the table output optionstab_options
Add a row group to a *gt* tabletab_row_group
Add a source note citationtab_source_note
Add a spanner labeltab_spanner
Create column labels and spanners via delimited column namestab_spanner_delim
Control indentation of row labels in the stubtab_stub_indent
Add label text to the stubheadtab_stubhead
Add custom styles to one or more cellstab_style
Target cells in the table body and style accordinglytab_style_body
Generate a path to a test imagetest_image
Perform whole or partial text replacements with a 'switch'-like approachtext_case_match
Perform whole text replacements using a 'case-when'-expression approachtext_case_when
Perform highly targeted text replacement with a regex patterntext_replace
Perform text transformations with a custom functiontext_transform
Populations of all municipalities in Ontario from 1996 to 2021towny
Get a conversion factor across two measurement units of a given classunit_conversion
Format a vector as values in terms of bytesvec_fmt_bytes
Format a vector as currency valuesvec_fmt_currency
Format a vector as date valuesvec_fmt_date
Format a vector as datetime valuesvec_fmt_datetime
Format a vector of numeric or duration values as styled time duration stringsvec_fmt_duration
Format a vector as values in engineering notationvec_fmt_engineering
Format a vector as mixed fractionsvec_fmt_fraction
Format a vector as indexed charactersvec_fmt_index
Format a vector as integer valuesvec_fmt_integer
Format a vector containing Markdown textvec_fmt_markdown
Format a vector as numeric valuesvec_fmt_number
Format a vector as parts-per quantitiesvec_fmt_partsper
Format a vector as percentage valuesvec_fmt_percent
Format a vector as Roman numeralsvec_fmt_roman
Format a vector as values in scientific notationvec_fmt_scientific
Format a vector as spelled-out numbersvec_fmt_spelled_num
Format a vector as time valuesvec_fmt_time
Helper function for adding an image from the webweb_image