GenericXtableSetAttributes: Set the attributes for a generic xtable object

View source: R/latex-xtable.R

GenericXtableSetAttributesR Documentation

Set the attributes for a generic xtable object

Description

This function helps you to set the attributes for an xtable object. It returns an xtable object.

Usage

GenericXtableSetAttributes(
  xtobject,
  nxtnames = NULL,
  nxtdigits = NULL,
  nxtdisplay = NULL,
  nxtalign = NULL,
  caption.text = "nxtcaption",
  caption.label = "tab:nxtlabel"
)

Arguments

xtobject

the xtable (table)

nxtnames

vector of names (column names)

nxtdigits

vector of digits (0 if column is non-numeric, numeric of desired number of digits otherwise)

nxtdisplay

vector of display format [see formatC(format=...)]

nxtalign

vector of LaTeX align (e.g., "l", "c", "r", "S[table-format=1.1]", ...)

caption.text

string for the LaTeX caption text

caption.label

string for the LaTeX reference label

Details

Sets names, digits, display, and align for the passed xtable object

Value

xtable object

Examples

## Not run: 
xtabWithAttributes <- GenericXtableSetAttributes(xtobject)
xtabWithAttributes <- GenericXtableSetAttributes(xtobject, nxtdigits = c(0, 2, 2, 4))

## End(Not run)

chepec/R-common documentation built on July 27, 2023, 11:33 a.m.