formatters0.5.9 package

ASCII Formatting for Values and Tables

basemethods

Print

basic_pagdf

Basic/spoof pagination info data frame

cdisc_data

Simulated CDISC-like data for examples

check_formats

Check if a format or alignment is supported

decimal_align

Decimal alignment

default_horizontal_sep

Default horizontal separator

default_page_number

Default page number format

divider_height

Divider height

do_forced_paginate

Generic for performing "forced" pagination

export_as_pdf

Export as PDF

export_as_rtf

Export as RTF

export_as_txt

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

fmt_config

Format configuration

font_lcpi

Calculate lines per inch and characters per inch for font

font_spec

Font size specification

format_value

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

formatters-package

formatters Package

ifnotlen0

%||% (if length-0) alternative operator

is.wholenumber

Check if a value is a whole number

lab_name

Label, name, and format accessor generics

list_formats

List of currently supported formats and vertical alignments

make_row_df

Make row layout summary data frames for use during pagination

matrix_form

Transform rtable to a list of matrices which can be used for outputt...

MatrixPrintForm_class

Class for Matrix Print Form

MatrixPrintForm

Constructor for Matrix Print Form

mpf_accessors

Getters and setters for aspects of MatrixPrintForm objects

mpf_to_rtf

Transform MatrixPrintForm to RTF

nchar_ttype

Calculate font-specific string width

nlines

Number of lines required to print a value

num_rep_cols

Number of repeated columns

open_font_dev

Activate font state

padstr

Pad a string and align within string

pag_indices_inner

Find pagination indices from pagination info data frame

pagdfrow

Create a row of a pagination data frame

page_lcpp

Determine lines per page (LPP) and characters per page (CPP) based on ...

page_types

Supported named page types

paginate_indices

Paginate a table-like object for rendering

pagination_algo

Pagination

propose_column_widths

Propose column widths based on the MatrixPrintForm of an object

ref_df_row

Create a row for a referential footnote information data frame

round_fmt

Round and prepare a value for display

spans_to_viscell

Transform a vector of spans (with duplication) into a visibility vecto...

spread_integer

Spread an integer to a given length

sprintf_format

Specify text format via a sprintf format string

table_inset

Access or (recursively) set table inset

test_matrix_form

Create spoof matrix form from a data frame

title_footer

General title and footer accessors

tostring

Transform objects into string representations

var_labels_remove

Remove variable labels of a data.frame

var_labels-set

Set label attributes of all variables in a data.frame

var_labels

Get label attributes of variables in a data.frame

var_relabel

Copy and change variable labels of a data.frame

vert_pag_indices

Find column indices for vertical pagination

with_label

Return an object with a label attribute

wrap_string_ttype

wrap string given a Truetype font

wrap_string

Wrap a string to a precise width

We provide a framework for rendering complex tables to ASCII, and a set of formatters for transforming values or sets of values into ASCII-ready display strings.

  • Maintainer: Joe Zhu
  • License: Apache License 2.0
  • Last published: 2024-09-12