openPage {hwriter}R Documentation

HTML document/page management

Description

Opens and closes a HTML page/document, allowing a sequential building of an HTML page.

Usage

openPage(filename, dirname=NULL, title=filename)

closePage(page)

Arguments

filename a character string containing the filename or the path of the HTML file to be created.
dirname an optional character string containing the path of the directory where the file should be written.
title an optional character string containing the title of the HTML page.
page a page handle returned by a previous openPage call.

Details

openPage opens a new file for writing and returns a page handle which is used by hwrite to append HTML elements in a current page. A previous existing file will be overwritten.

closePage ends the HTML page formatting, flushes the pending writing operations and closes the file.

Value

A connection which is a handle to the current HTML page.

Author(s)

Gregoire Pau, gpau@ebi.ac.uk, 2008

See Also

hwrite.

Examples

## Creates a new web page 'test.html'
p <- openPage('test.html')
hwrite('Iris example', p, center=TRUE, heading=1)
hwrite(iris, p, row.bgcolor='#ffa')
closePage(p)

## Opens a web browser
browseURL('test.html')

[Package hwriter version 0.91 Index]