get FlexTable from a ftable object

Description

Get a FlexTable object from a ftable object.

Usage

1
2
3
## S3 method for class 'ftable'
as.FlexTable(x, text.properties = textNormal(),
  padding.left = 4, padding.right = 4, ...)

Arguments

x

object to get FlexTable from

text.properties

default text formatting properties

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
#
# ftable example 1 -------------
mtcars_ftable = ftable(mtcars$cyl, mtcars$vs, mtcars$am, mtcars$gear, 
	row.vars = c(2, 4),
	dnn = c("Cylinders", "V/S", "Transmission", "Gears"))

FT = as.FlexTable( x = mtcars_ftable, caption = pot("This is a caption", 
	textBold(color="blue") ) ) 
print( FT )
if( interactive() ) readline("Hit <Return> to see next FlexTable:")


# ftable example 2 -------------
FT = as.FlexTable( x = ftable(Titanic, row.vars = 1:3) )
print( FT )
if( interactive() ) readline("Hit <Return> to see next FlexTable:")

FT = as.FlexTable( x = ftable(Titanic, row.vars = 1:2, col.vars = "Survived") )
print( FT )
if( interactive() ) readline("Hit <Return> to see next FlexTable:")

FT = as.FlexTable( x = ftable(Titanic, row.vars = 2:1, col.vars = "Survived") )
print( FT )