as.FlexTable.xtable: get FlexTable from a xtable object

Description Usage Arguments Value Examples

Description

Get a FlexTable object from a xtable object.

Usage

1
2
3
4
## S3 method for class 'xtable'
as.FlexTable(x, text.properties = textNormal(),
  format.args = list(), hline.after = getOption("xtable.hline.after", c(-1,
  0, nrow(x))), padding.left = 4, padding.right = 4, ...)

Arguments

x

xtable object to get FlexTable from

text.properties

default text formatting properties

format.args

List of arguments for the formatC function. See argument format.args of print.xtable

hline.after

a vector of numbers between -1 and "nrow(x)", inclusive, indicating the rows after which a horizontal line should appear. see argument hline.after of print.xtable.

padding.left

cells paragraphs left padding - 0 or positive integer value.

padding.right

cells paragraphs right padding - 0 or positive integer value.

...

further arguments, not used.

Value

a FlexTable object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#
data(tli)

tli.table <- xtable(tli[1:10,])
digits(tli.table)[c(2,6)] <- 0
FT = as.FlexTable( x = tli.table )
print( FT )
if( interactive() ) readline("Hit <Return> to see next FlexTable:")


align(tli.table) <- "|rrl|l|lr|"
FT = as.FlexTable( x = tli.table )
print( FT )
if( interactive() ) readline("Hit <Return> to see next FlexTable:")


fm1 <- aov(tlimth ~ sex + ethnicty + grade + disadvg, data=tli)
fm1.table <- xtable(fm1)
FT = as.FlexTable( x = fm1.table )
print( FT )
if( interactive() ) readline("Hit <Return> to see next FlexTable:")


bktbs <- xtable(matrix(1:10, ncol = 2))
hlines <- c(-1,0,1,nrow(bktbs))
FT = as.FlexTable(bktbs, hline.after = hlines )
print( FT )

davidgohel/rtable documentation built on May 15, 2019, 1:12 a.m.