[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-573892-105":53,"doc-detail-573892-en":125},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":118,"head_meta":120,"extra_data":122,"updated_unix":124},105,"en","gt-cheat-sheet","gt - CHEAT SHEET","","Cheat sheet for the R gt package, focused on creating and styling informative tables from data frames. Covers installation, structuring techniques such as headers/footers, stubs, row grouping, and column spanners, plus styling with tab_style, tab_options, opt_stylize, and font/table-wide themes. Provides examples for building gt tables and formatting data values, including date/time, numeric formats (decimal, integer, percent, scientific), and graphical formatting like images, icons, flags, colorization via data_color, and interactive nanoplots.",{"@graph":63,"@context":117},[64,80,100],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/gt-cheat-sheet/573892/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":94,"encodingFormat":93,"isAccessibleForFree":95,"interactionStatistic":96},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/gt-cheat-sheet/573892.png","ImageObject",442,249,{"name":88,"@type":89},"asda1da","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-14",true,{"@type":97,"interactionType":98,"userInteractionCount":9},"InteractionCounter",{"@type":99},"ViewAction",{"@type":101,"mainEntity":102},"FAQPage",[103,109,113],{"name":104,"@type":105,"acceptedAnswer":106},"What is the gt package used for?","Question",{"text":107,"@type":108},"The gt package builds beautiful, informative table displays from R data frames. It includes functions to structure, format, and style tables.","Answer",{"name":110,"@type":105,"acceptedAnswer":111},"How can a table be structured with headers, footers, and stubs?",{"text":112,"@type":108},"Use tab_header() for a title/subtitle, tab_source_note() for footer text, and tab_footnote() for footnotes. Add a stub with gt(rowname_col = \"column\") and group rows with gt(groupname_col = \"column\").",{"name":114,"@type":105,"acceptedAnswer":115},"Which functions help format different kinds of table values?",{"text":116,"@type":108},"Use formatting helpers like fmt_number(), fmt_integer(), fmt_percent(), and fmt_scientific() for numeric types, and fmt_date(), fmt_time(), or fmt_datetime() for date/time. For graphics, use fmt_image(), fmt_icon(), and fmt_flag(), plus data_color() and cols_nanoplot() for colorization and interactive nanoplots.","https://schema.org",{"og:url":78,"og:type":119,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":121,"canonical":78},"index,follow",{"doc_id":123,"site_id":56},573892,1792015514,{"code":4,"msg":5,"data":126},{"doc_id":123,"user_id":127,"nickname":88,"user_avatar":128,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":129,"file_id":130,"file_url":131,"file_type":132,"file_size":133,"view_count":9,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":9,"language":134,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":135,"faqs":136,"seo_title":137,"seo_description":61,"update_tm":138,"read_time":4},3985747861852,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","Introduction  \nThe resulting tables can be easily displayed in Shiny apps and Quarto documents. And there are quite a few output formats for your tables, including HTML, LaTeX, RTF, and Word.  \nINSTALLATION  install.packages(\"gt\")   \ngt : : CHEAT SHEET  \nThe gt package allows you to make beautiful, informative table displays from R data frames. The package provides functions for you to structure, format, and style the table to your heart's content.  \nAdding Structure  \nADDING A HEADER AND FOOTER  \ntab_header() → add title and optional subtitle, can use md() or html() helpers tab_source_note() → add text to table footer (above helpers can be used here too) tab_footnote() → add footnote to footer; needs a location (see Styling... for this)  \nADDING A STUB AND ROW GROUPS  \ngt(rowname_col = \"column\") → assign a column with row names to the stub gt(groupname_col = \"column\") → use column with categoricals to group rows  \nADDING COLUMN SPANNERS  \ntab_spanner() → add spanner over colstab_spanner_delim() → use delimited column names to set up multiple spanners  \nStyling the Table  \nONE FUNCTION FOR STYLING EVERYWHERE  \ntab_style() → apply styles to various locations  \nTHE DIFFERENT LOCATIONS OFA TABLE  \nTHREE WAYS TO STYLE  \ncell_fill() → fill location with color  \ncell_text() → style location's text cell_borders() → set up borders and define styles for them  \nYOU ALSO HAVE OTHER OPTIONS  \ntab_options() → many, many options for styling that applies to whole table opt_stylize() → set a theme, 36 looks opt_table_font() → set a font to use  \ngt_tbl |> tab_style(style = list(styles), locations = list( locations ))  \nCreating a gt Table  \ntable body  \ndisplay HTML table  \nOUTPUT  \nBASIC EXAMPLE WITH SAMPLE DATA  \ncolumn labels  \nSAMPLE DATASETS  \ncountrypops, sza, gtcars, sp500, films, pizzaplace, exibble, towny, peeps + more  \nFormatting Data Values  \nFORMATTING BASICS  \nDATE/TIME FORMATTING  \nFormatting functions have the columns and rows options to specify which body values should be formatted.  \ncolumns = E* rows = E*  \nformat all values  \ncolumns = \"C\"rows = E*  \nformat all C values  \ncolumns = \"C\"rows = 1:2  \nA B C  \nformat some C values  \ncolumns = E* rows = 1:2  \nformat rows of values  \nA B C  \nNUMERIC FORMATTING  \n1 fmt_number() → decimal values  \n2 fmt_integer() → integer values  \n3 fmt_percent() → percentage values  \n4 fmt_scientific() → scientific not'n  \ncommon options: decimals in 1,3,4,5 for fixed \\# of decimals / scale_by in 1,2,4,5 to multiply number before formatting / accounting in 1,2,3 to display in that notation / suffixing in 1,2 to condense large numbers / locale in 1–5 to localize formatted values to language/region.  \nFORMATTING INVOLVING GRAPHICS  \nfmt_date() → format with a date style preset iso: \"2000-02-29\" (the default)  \nwday_month_day_year: \"Tuesday, February 29, 2000\"  \nwd_m_day_year: \"Tue, Feb 29, 2000\"  \nwday_day_month_year: \"Tuesday 29 February 2000\"  \nmonth_day_year: \"February 29, 2000\"fmt_time() → format with a time style preset iso: \"14:35:00\" (the default)  \nh_m_s_p: \"2:35:00 PM\"  \nh_m_p: \"2:35 PM\"  \nfmt_datetime() → format with date/time style presets or with format option for more control  \nfmt_image() → insert images to cells with filenames; path / file_pattern help resolve fmt_icon() → add icons to cells containing FontAwesome short icon names (e.g., \"cat\")  \nfmt_flag() → add flag icons to cells w/ 2-or 3-letter country codes (e.g., \"LU\" or \"LUX\")  \ncommon to all: cells may have multiple instances of replaceable text for these formatters, they must be comma-separated though.  \nE* means everything()  \n5 fmt_engineering() → engineering  \nnot'n  \ncreate GT object  \nCOLORIZING BODY CELLS  \ndata_color() → apply color to a series of cells according to their value  \ndomain = NULL palette = \"Reds\"  \ncoloring to range of data  \ndomain = c(0, 9) palette = \"Reds\"  \nsetting a fixed range  \ndomain = c(0, 6) na_color = \"blue\"  \nsetting colors for NA/OOB values  \nADDING NANOPLOTS  \ncols_nanoplot() → convert ser","cbCaiiEporBlQmP5","https://ap.wps.com/l/cbCaiiEporBlQmP5","pdf",2584408,"English","# Introduction\n## Installation\n## Adding Structure\n## Styling the Table\n## Creating a gt Table\n## Formatting Data Values\n## Numeric Formatting\n## Formatting Involving Graphics","[{\"question\":\"What is the gt package used for?\",\"answer\":\"The gt package builds beautiful, informative table displays from R data frames. It includes functions to structure, format, and style tables.\"},{\"question\":\"How can a table be structured with headers, footers, and stubs?\",\"answer\":\"Use tab_header() for a title/subtitle, tab_source_note() for footer text, and tab_footnote() for footnotes. Add a stub with gt(rowname_col = \\\"column\\\") and group rows with gt(groupname_col = \\\"column\\\").\"},{\"question\":\"Which functions help format different kinds of table values?\",\"answer\":\"Use formatting helpers like fmt_number(), fmt_integer(), fmt_percent(), and fmt_scientific() for numeric types, and fmt_date(), fmt_time(), or fmt_datetime() for date/time. For graphics, use fmt_image(), fmt_icon(), and fmt_flag(), plus data_color() and cols_nanoplot() for colorization and interactive nanoplots.\"}]","gt - CHEAT SHEET | PDF",1791950523]