ReporteRs (version 0.6.6)

as.html.FlexTable: get HTML code from a FlexTable

Description

get HTML code from a FlexTable

Usage

# S3 method for FlexTable
as.html(object, ...)

Arguments

object

the FlexTable object

...

further arguments passed to other methods

Value

a character value

See Also

FlexTable

Examples

Run this code
# NOT RUN {
#START_TAG_TEST
#####################################################################

# Create a FlexTable with data.frame mtcars, display rownames
# use different formatting properties for header and body
MyFTable = FlexTable( data = mtcars, add.rownames = TRUE, 
  header.cell.props = cellProperties( background.color = "#00557F" ), 
  header.text.props = textProperties( color = "white", 
    font.size = 11, font.weight = "bold" ), 
  body.text.props = textProperties( font.size = 10 )
)
# zebra stripes - alternate colored backgrounds on table rows
MyFTable = setZebraStyle( MyFTable, odd = "#E1EEf4", even = "white" )

# applies a border grid on table
MyFTable = setFlexTableBorders(MyFTable,
  inner.vertical = borderProperties( color="#0070A8", style="solid" ),
  inner.horizontal = borderNone(),
  outer.vertical = borderProperties( color = "#006699", style = "solid", width = 2 ),
  outer.horizontal = borderProperties( color = "#006699", style = "solid", width = 2 )
)

# get HTML of the FlexTable
as.html( MyFTable )
#STOP_TAG_TEST
# }

Run the code above in your browser using DataCamp Workspace