HTMLTable: Create a simple HTML table to represent an R vector

Description Usage Arguments Value Author(s) See Also Examples

Description

This is a very simple utility function to create an HTML table that displays information from an R object, typically just a simple one-dimensional vector with names. It is used to create the description for a point in a KML display. When the viewer clicks on a point, this is displayed in a "balloon".

This is not intended to be as intelligent and flexible as functions in the XML or XDynDocs or RWordXML or R2HTML packages for representing arbitrary R objects in HTML or another format.

Usage

1
HTMLTable(x, labels = names(x), byRow = TRUE, ...)

Arguments

x

the R object which is to be displayed as a table, currently a named vector

labels

column names for the table

byRow

currently ignored but potentially a logical value that would control whether to organize the display of the elements by colum or row

...

additional parameters for methods

Value

An XMLInternalNode representing the table. To convert this to a character representation of the table, use saveXML.

Author(s)

Duncan Temple Lang

See Also

kmlTime and kmlPoints or the general kml

Examples

1
2
3
4
5
  HTMLTable(1:3)
  HTMLTable(1:3, byRow = FALSE)
  HTMLTable(structure(1:3, names = c("ABC", "DEF", "GHI")))
  HTMLTable(structure(1:3, names = c("ABC", "DEF", "GHI")), byRow = FALSE)
  HTMLTable(mtcars)

duncantl/RKML documentation built on May 15, 2019, 5:31 p.m.