Learn R Programming

basictabler (version 0.1.1)

qhtbl: Quickly render a basic table in HTML.

Description

The qhpvt function renders a basic table as a HTML widget with one line of R.

Usage

qhtbl(dataFrameOrMatrix, columnNamesAsColumnHeaders = TRUE,
  explicitColumnHeaders = NULL, rowNamesAsRowHeaders = FALSE,
  firstColumnAsRowHeaders = FALSE, explicitRowHeaders = NULL,
  columnFormats = NULL, ...)

Arguments

dataFrameOrMatrix

The data frame or matrix containing the data to be displayed in the table.

columnNamesAsColumnHeaders

TRUE to use the data frame column names as the column headers in the table.

explicitColumnHeaders

A character vector of column headers.

rowNamesAsRowHeaders

TRUE to use the data frame row names as the row headers in the table.

firstColumnAsRowHeaders

TRUE to use the first column in the data frame as row headings.

explicitRowHeaders

A character vector of row headers.

columnFormats

A list containing format specifiers, each of which is either an sprintf() character value, a list of format() arguments or an R function that provides custom formatting logic.

...

Additional arguments, currently only argumentCheckMode.

Value

A basic table.

Examples

Run this code
# NOT RUN {
qhtbl(head(bhmsummary))
qhtbl(bhmsummary[1:5, c("GbttWeekDate", "Origin", "Destination", "TrainCount",
  "OnTimeArrivals")])
qhtbl(bhmsummary[1:5, c("GbttWeekDate", "Origin", "Destination", "TrainCount",
  "OnTimeArrivals")], columnNamesAsColumnHeaders=FALSE,
  explicitColumnHeaders=c("Week", "From", "To", "Trains", "On-Time"))

# }

Run the code above in your browser using DataLab