topic_long_table_alignment: Set alignment for a topiclongtable

View source: R/topic_long_table_alignment.R

topic_long_table_alignmentR Documentation

Set alignment for a topiclongtable

Description

Set alignment for a topiclongtable

Usage

topic_long_table_alignment(
  x,
  topic_cols,
  align = NULL,
  left_border = "|",
  inner_border = "|",
  right_border = "|",
  ...
)

## S3 method for class 'numeric'
topic_long_table_alignment(x, ...)

## Default S3 method:
topic_long_table_alignment(x, ...)

## S3 method for class 'data.frame'
topic_long_table_alignment(
  x,
  topic_cols,
  align = NULL,
  left_border = "|",
  inner_border = "|",
  right_border = "|",
  ...,
  verbatim = NULL
)

## S3 method for class 'matrix'
topic_long_table_alignment(x, topic_cols, align = NULL, ...)

Arguments

x

The object to make into a topiclongtable (typically a data.frame or matrix)

topic_cols

Number of columns which are topics (where rowspans may be used).

align

The alignment to use. If NULL, defaults are used.

left_border, inner_border, right_border

The left, inner, and right borders of the table.

...

Passed to other topic_long_table_alignment methods.

verbatim

Use the provided character scalar verbatim without other processing.

Value

A character scalar defining the alignment either for the current column (for individual classes) or the entire table (for table classes like data.frame and matrix).

Methods (by class)

  • topic_long_table_alignment(numeric): For numbers, align on decimal.

  • topic_long_table_alignment(default): For anything not specified, left justify.

  • topic_long_table_alignment(data.frame): For data.frames, alignment occurs by column class.

  • topic_long_table_alignment(matrix): For matrices, alignment occurs by class.


billdenney/TopicLongTableR documentation built on Aug. 27, 2023, 10:16 p.m.