Learn R Programming

⚠️There's a newer version (0.5.11) of this package.Take me there.

formatters

[![Check

Copy Link

Version

Install

install.packages('formatters')

Monthly Downloads

4,326

Version

0.5.10

License

Apache License 2.0

Issues

Pull Requests

Stars

Forks

Maintainer

Joe Zhu

Last Published

April 9th, 2025

Functions in formatters (0.5.10)

fmt_config

Format configuration
formatters-package

formatters Package
nchar_ttype

Calculate font-specific string width
lab_name

Label, name, and format accessor generics
list_formats

List of currently supported formats and vertical alignments
do_forced_paginate

Generic for performing "forced" pagination
nlines

Number of lines required to print a value
font_spec

Font size specification
matrix_form

Transform rtable to a list of matrices which can be used for outputting
make_row_df

Make row layout summary data frames for use during pagination
num_rep_cols

Number of repeated columns
ifnotlen0

%||% (if length-0) alternative operator
is.wholenumber

Check if a value is a whole number
export_as_pdf

Export as PDF
export_as_rtf

Export as RTF
page_types

Supported named page types
open_font_dev

Activate font state
mf_strings

Getters and setters for aspects of MatrixPrintForm objects
mpf_to_rtf

Transform MatrixPrintForm to RTF
round_fmt

Round and prepare a value for display
toString

Transform objects into string representations
ref_df_row

Create a row for a referential footnote information data frame
var_labels<-

Set label attributes of all variables in a data.frame
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
spread_integer

Spread an integer to a given length
pagdfrow

Create a row of a pagination data frame
test_matrix_form

Create spoof matrix form from a data frame
pagination_algo

Pagination
paginate_indices

Paginate a table-like object for rendering
split_word_ttype

wrap string given a Truetype font
padstr

Pad a string and align within string
page_lcpp

Determine lines per page (LPP) and characters per page (CPP) based on font and page type
var_labels

Get label attributes of variables in a data.frame
var_relabel

Copy and change variable labels of a data.frame
pag_indices_inner

Find pagination indices from pagination info data frame
var_labels_remove

Remove variable labels of a data.frame
main_title

General title and footer accessors
vert_pag_indices

Find column indices for vertical pagination
sprintf_format

Specify text format via a sprintf format string
table_inset

Access or (recursively) set table inset
wrap_string

Wrap a string to a precise width
with_label

Return an object with a label attribute
basic_pagdf

Basic/spoof pagination info data frame
ex_adsl

Simulated CDISC-like data for examples
default_page_number

Default page number format
default_horizontal_sep

Default horizontal separator
print,ANY-method

Print
MatrixPrintForm-class

Class for Matrix Print Form
decimal_align

Decimal alignment
check_formats

Check if a format or alignment is supported
MatrixPrintForm

Constructor for Matrix Print Form
format_value

Converts a (possibly compound) value into a string using the format information
export_as_txt

Export a table-like object to plain (ASCII) text with page breaks
divider_height

Divider height
DM

DM data
font_lcpi

Calculate lines per inch and characters per inch for font