ReporteRs (version 0.5.5)

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
#####################################################################

# set default font size to 10
options( "ReporteRs-fontsize" = 10 )

# Create a FlexTable with data.frame mtcars, display rownames
# use different formatting properties for header and body cells
MyFTable = FlexTable( data = mtcars, add.rownames = TRUE
  , body.cell.props = cellProperties( border.color = "#EDBD3E")
  , header.cell.props = cellProperties( background.color = "#5B7778" )
)
# zebra stripes - alternate colored backgrounds on table rows
MyFTable = setZebraStyle( MyFTable, odd = "#D1E6E7", even = "#93A8A9" )

# applies a border grid on table
MyFTable = setFlexTableBorders(MyFTable
  , inner.vertical = borderProperties( color="#EDBD3E", style="dotted" )
  , inner.horizontal = borderProperties( color = "#EDBD3E", style = "none" )
  , outer.vertical = borderProperties( color = "#EDBD3E", style = "solid" )
  , outer.horizontal = borderProperties( color = "#EDBD3E", style = "solid" )
)

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

Run the code above in your browser using DataCamp Workspace