jrc (version 0.3.0)

sendHTML: Send HTML to a web page

Description

Sends a piece of HTML code to a web page and adds it at the end or the body element. This function is a wrapper around sendHTML method of class Session.

Usage

sendHTML(html = "", sessionId = NULL, wait = 0)

Arguments

html

HTML code that will be added to the web page.

sessionId

An ID of the session to which the HTML should be sent. Can also be a vector of multiple session IDs. If NULL, the HTML will be sent to all currently active sessions.

wait

If wait > 0, after sending the message, R will wait for a reply for a given number of seconds. For this time (or until the reply is received), execution of other commands will be halted. Any incoming message from the session will be considered as a reply.

See Also

sendData, sendCommand, callFunction, openPage.

Examples

Run this code
# NOT RUN {
openPage(FALSE)

sendHTML("Test...")
sendHTML("This is <b>bold</b>")
sendHTML("<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab