rtable (version 0.1.5)

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

Description

Get a FlexTable object from a ftable object.

Usage

"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

Run this code
#
# 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 )


Run the code above in your browser using DataLab