Skip to contents

We can get a table information report from an informant object that's generated by the create_informant() function. The report is provided as a gt based display table. The amount of information shown depends on the extent of that added via the use of the info_*() functions or through direct editing of a pointblank YAML file (an informant can be written to pointblank YAML with yaml_write(informant = <informant>, ...)).

Usage

get_informant_report(
  informant,
  size = "standard",
  title = ":default:",
  lang = NULL,
  locale = NULL
)

Arguments

informant

The pointblank informant object

obj:<ptblank_informant> // required

A pointblank informant object that is commonly created through the use of the create_informant() function.

size

Size option for display-table report

scalar<character> // default: "standard"

The size of the display table, which can be either "standard" (the default, with a width of 875px), "small" (width of 575px), or, a pixel- or percent-based width of your choosing (supply an integer value for the width in pixels, or values with "px" or "%" appended, like "75%", "500px", etc.).

title

Title customization options

scalar<character> // default: ":default:"

Options for customizing the title of the report. The default is the keyword ":default:" which produces generic title text that refers to the pointblank package in the language governed by the lang option. Another keyword option is ":tbl_name:", and that presents the name of the table as the title for the report. If no title is wanted, then the ":none:" keyword option can be used. Aside from keyword options, text can be provided for the title and glue::glue() calls can be used to construct the text string. If providing text, it will be interpreted as Markdown text and transformed internally to HTML. To circumvent such a transformation, use text in I() to explicitly state that the supplied text should not be transformed.

lang

Reporting language

scalar<character> // default: NULL (optional)

The language to use for the information report. By default, NULL will create English ("en") text. Other options include French ("fr"), German ("de"), Italian ("it"), Spanish ("es"), Portuguese ("pt"), Turkish ("tr"), Chinese ("zh"), Russian ("ru"), Polish ("pl"), Danish ("da"), Swedish ("sv"), and Dutch ("nl"). This lang option will override any previously set language setting (e.g., by the create_informant() call).

locale

Locale for value formatting

scalar<character> // default: NULL (optional)

An optional locale ID to use for formatting values in the information report summary table according the locale's rules. Examples include "en_US" for English (United States) and "fr_FR" for French (France); more simply, this can be a language identifier without a country designation, like "es" for Spanish (Spain, same as "es_ES"). This locale option will override any previously set locale value (e.g., by the create_informant() call).

Value

A gt table object.

Function ID

7-2

See also

Other Incorporate and Report: incorporate()

Examples

# Generate an informant object using
# the `small_table` dataset
informant <- create_informant(small_table)

# This function creates some information
# without any extra help by profiling
# the supplied table object; it adds
# the sections 'table' and columns' and
# we can print the object to see the
# table information report

# Alternatively, we can get the same report
# by using `get_informant_report()`
report <- get_informant_report(informant)
class(report)
#> [1] "ptblank_informant_report" "gt_tbl"                  
#> [3] "list"