Skip to contents

Formatters Overview

formatters formatters-package
formatters Package

Formatting Values

Functions related to applying formats to values

format_value()
Converts a (possibly compound) value into a string using the format information
round_fmt()
Round and prepare a value for display
is_valid_format() check_aligns()
Check if a format or alignment is supported
is.wholenumber()
Check if a value is a whole number
list_valid_format_labels() list_valid_aligns()
List of currently supported formats and vertical alignments
sprintf_format()
Specify text format via a sprintf format string
fmt_config()
Format configuration

Generics Interface For Pagination

Generics required for pagination machinery

make_row_df()
Make row layout summary data frames for use during pagination
pagdfrow()
Create a row of a pagination data frame
nlines()
Number of lines required to print a value
divider_height()
Divider height
main_title() `main_title<-`() subtitles() `subtitles<-`() page_titles() `page_titles<-`() main_footer() `main_footer<-`() prov_footer() `prov_footer<-`() all_footers() all_titles()
General title and footer accessors
num_rep_cols()
Number of repeated columns
do_forced_paginate()
Generic for performing "forced" pagination

Generics Interface for ASCII Rendering

Generics required for rendering table-like object to ASCII

matrix_form()
Transform rtable to a list of matrices which can be used for outputting
basic_matrix_form() basic_listing_mf()
Create spoof matrix form from a data frame

MatrixPrintForm

Intermediate representation for ASCII table printing

MatrixPrintForm()
Constructor for Matrix Print Form
MatrixPrintForm-class
Class for Matrix Print Form

ASCII Rendering of MatrixPrintForm objects

ASCII rendering-related functions which operate on MatrixPrintForm objects

toString()
Transform objects into string representations
spans_to_viscell()
Transform a vector of spans (with duplication) into a visibility vector
propose_column_widths()
Propose column widths based on the MatrixPrintForm of an object
decimal_align()
Decimal alignment
list_valid_format_labels() list_valid_aligns()
List of currently supported formats and vertical alignments
padstr()
Pad a string and align within string
spread_integer()
Spread an integer to a given length
is.wholenumber()
Check if a value is a whole number

Pagination

paginate_indices() paginate_to_mpfs() diagnose_pagination()
Paginate a table-like object for rendering
pagination_algo
Pagination
pag_indices_inner()
Find pagination indices from pagination info data frame
vert_pag_indices()
Find column indices for vertical pagination
pagdfrow()
Create a row of a pagination data frame
basic_pagdf()
Basic/spoof pagination info data frame

Variable Labels

Functions for assigning labels to variables in data

`var_labels<-`()
Set label attributes of all variables in a data.frame
var_labels()
Get label attributes of variables in a data.frame
var_labels_remove()
Remove variable labels of a data.frame
var_relabel()
Copy and change variable labels of a data.frame
with_label()
Return an object with a label attribute

General Accessors

Data

Data included with the package

ex_adsl ex_adae ex_adaette ex_adtte ex_adcm ex_adlb ex_admh ex_adqs ex_adrs ex_advs
Simulated CDISC-like data for examples
DM
DM data

Export

Export into different object types

export_as_txt()
Export a table-like object to plain (ASCII) text with page breaks
export_as_rtf()
Export as RTF
export_as_pdf()
Export as PDF
mpf_to_rtf()
Transform MatrixPrintForm to RTF

Miscellany

Other documented functions used by developers of this package

print(<ANY>)
Print
wrap_string() wrap_txt()
Wrap a string to a precise width
`%||%`
%||% (if length-0) alternative operator
table_inset() `table_inset<-`()
Access or (recursively) set table inset
default_hsep() set_default_hsep()
Default horizontal separator
mf_strings() mf_spans() mf_aligns() mf_display() mf_formats() mf_rinfo() mf_cinfo() mf_has_topleft() mf_lgrouping() mf_rfnotes() mf_nlheader() mf_nrheader() mf_colgap() `mf_strings<-`() `mf_spans<-`() `mf_aligns<-`() `mf_display<-`() `mf_formats<-`() `mf_rinfo<-`() `mf_cinfo<-`() `mf_lgrouping<-`() `mf_rfnotes<-`() `mf_nrheader<-`() `mf_colgap<-`() mf_ncol() mf_nrow() `mf_ncol<-`() ncol(<MatrixPrintForm>) mpf_has_rlabels() mf_has_rlabels()
Getters and setters for aspects of MatrixPrintForm objects
page_lcpp()
Determine lines per page (LPP) and characters per page (CPP) based on font and page type
page_types() page_dim()
Supported named page types
ref_df_row()
Create a row for a referential footnote information data frame
default_page_number() set_default_page_number()
Default page number format